Skip to content
Snippets Groups Projects

Merge of small MRs that make changes to the Python bindings

Merged Andreas Dedner requested to merge features/combinedPythonMRs into master
1 unresolved thread
Compare and Show latest version
7 files
+ 50
50
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 12
2
@@ -96,8 +96,8 @@ def main(argv):
# Generate pyproject.toml
print("Generate pyproject.toml")
f = open("pyproject.toml", "w")
requires = ["setuptools", "wheel", "scikit-build", "cmake", "ninja", "requests", "portalocker", "numpy"]
requires += data.asPythonRequirementString(data.depends + data.python_requires)
requires = ["setuptools", "wheel", "scikit-build", "cmake", "ninja", "requests"]
requires += [r for r in data.asPythonRequirementString(data.depends + data.python_requires) if r not in requires]
f.write("[build-system]\n")
f.write("requires = "+requires.__str__()+"\n")
f.write("build-backend = 'setuptools.build_meta'\n")
@@ -117,6 +117,12 @@ def main(argv):
print("Please install the pip package 'scikit-build' to build the source distribution.")
sys.exit(2)
# append hash of current git commit to README
githash = ['git', 'rev-parse', 'HEAD']
hash = subprocess.check_output(githash, encoding='UTF-8')
with open("README.md", "a") as f:
f.write("\n\ngit-" + hash)
print("Create source distribution")
# make sure setup.py/pyproject.toml are tracked by git so that
# they get added to the package by scikit
@@ -129,6 +135,10 @@ def main(argv):
gitreset = ['git', 'reset', 'setup.py', 'pyproject.toml']
subprocess.call(gitreset)
# checkout README.md
gitcheckout = ['git', 'checkout', 'README.md']
subprocess.call(gitcheckout)
if not onlysdist:
# check if we have twine
import pkg_resources
Loading