diff --git a/Makefile.am b/Makefile.am index a96cfda..de651ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -190,6 +190,12 @@ python-test: src/test.py src/_pytrexio*.so cd src/ && python3 test.py $(RM) -r -- src/__pycache__ +python-build: pyproject.toml setup.cfg + python3 -m build + +python-release: pyproject.toml setup.cfg + python3 -m twine upload --repository testpypi dist/* + # Advanced compilation using Python-native distutils # # swig -python -threads pytrexio.i ----> Add thread support for all the interface @@ -216,7 +222,7 @@ src/_pytrexio*.so: $(ORG_FILES) $(trexio_h) src/pytrexio.i CLEANFILES += src/pytrexio_wrap.c src/pytrexio.py src/_pytrexio*.so -.PHONY: cppcheck python python-test +.PHONY: cppcheck python python-build python-test endif diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d484910 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = [ + "setuptools>=42", + "h5py", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b9e161b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,23 @@ +[metadata] +name = pytrexio666 +version = 0.1 +author = TREX-CoE +description = Python API of the TREXIO library +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/TREX-CoE/trexio +project_urls = + Bug Tracker = https://github.com/TREX-CoE/trexio/issues +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: BSD License + +[options] +package_dir = + = src +packages = find: +python_requires = >=3.6 + +[options.packages.find] +where = src +