use setuptools_scm for python version management (#627)
* use setuptools_scm for python version management * add git dep for python wheel building * if no tag is defined, default to dev * any untagged version default to 0.0.1
This commit is contained in:
committed by
Alex Crichton
parent
750355d76b
commit
5cdae1d394
@@ -60,6 +60,7 @@ const exec = s => {
|
|||||||
exec('yum install -y centos-release-scl cmake xz epel-release');
|
exec('yum install -y centos-release-scl cmake xz epel-release');
|
||||||
exec('yum install -y rh-python36 patchelf unzip');
|
exec('yum install -y rh-python36 patchelf unzip');
|
||||||
exec('yum install -y devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++');
|
exec('yum install -y devtoolset-8-gcc devtoolset-8-binutils devtoolset-8-gcc-c++');
|
||||||
|
exec('yum install -y git');
|
||||||
|
|
||||||
// Delete `libstdc++.so` to force gcc to link against `libstdc++.a` instead.
|
// Delete `libstdc++.so` to force gcc to link against `libstdc++.a` instead.
|
||||||
// This is a hack and not the right way to do this, but it ends up doing the
|
// This is a hack and not the right way to do this, but it ends up doing the
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools_rust import Binding, RustExtension
|
from setuptools_rust import Binding, RustExtension
|
||||||
|
|
||||||
|
|
||||||
|
def no_tag_default_to_dev(version):
|
||||||
|
if version.exact:
|
||||||
|
return version.format_with("{tag}")
|
||||||
|
return "0.0.1"
|
||||||
|
|
||||||
|
|
||||||
setup(name='wasmtime',
|
setup(name='wasmtime',
|
||||||
version="0.0.1",
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 1 - Planning",
|
"Development Status :: 1 - Planning",
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
@@ -14,5 +20,12 @@ setup(name='wasmtime',
|
|||||||
],
|
],
|
||||||
packages=['wasmtime'],
|
packages=['wasmtime'],
|
||||||
package_dir={'wasmtime': 'python/wasmtime'},
|
package_dir={'wasmtime': 'python/wasmtime'},
|
||||||
|
use_scm_version = {
|
||||||
|
"root": "../../..",
|
||||||
|
"relative_to": __file__,
|
||||||
|
"version_scheme": no_tag_default_to_dev,
|
||||||
|
"local_scheme": lambda _: "",
|
||||||
|
},
|
||||||
|
setup_requires=['setuptools_scm'],
|
||||||
rust_extensions=[RustExtension('wasmtime.lib_wasmtime', 'Cargo.toml', binding=Binding.PyO3)],
|
rust_extensions=[RustExtension('wasmtime.lib_wasmtime', 'Cargo.toml', binding=Binding.PyO3)],
|
||||||
zip_safe=False)
|
zip_safe=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user