diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8abe0c7..a71debfe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: >- - python -m pip install --user --upgrade setuptools wheel + python -m pip install --user --upgrade setuptools wheel build - name: Build run: >- - python setup.py sdist bdist_wheel + python -m build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e4044c6a..de34b743 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,10 +27,10 @@ jobs: - name: Install dependencies run: >- - python -m pip install --user --upgrade setuptools wheel + python -m pip install --user --upgrade setuptools wheel build - name: Build run: >- - python setup.py sdist bdist_wheel + python -m build - name: Publish distribution 📦 to PyPI if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..c95a1da9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires=["setuptools>=64", "versioneer[toml]"] +build-backend="setuptools.build_meta" + +[project] +name="hippynn" +dynamic=["version"] +authors=[{name="Nicholas Lubbers et al",email="hippynn@lanl.gov"}] +description="The hippynn python package - a modular library for atomistic machine learning with pytorch" +requires-python=">=3.9" +license={text="BSD 3-Clause License"} +classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Software Development :: Libraries", +] +readme="README.rst" +dependencies=[ + "numpy", + "torch", +] + +[project.optional-dependencies] +docs=[ + "sphinx", + "sphinx_rtd_theme", + "ase", +] +full=[ + "ase", + "numba", + "matplotlib", + "tqdm", + "graphviz", + "h5py", + "lightning", +] \ No newline at end of file diff --git a/setup.py b/setup.py index 95d1333e..9592002d 100644 --- a/setup.py +++ b/setup.py @@ -1,47 +1,8 @@ import setuptools import versioneer -with open("README.rst", "r") as fh: - long_description = fh.read() - -doc_requirements = [ - "sphinx", - "sphinx_rtd_theme", - "ase", -] - -full_requirements = [ - "ase", - "numba", - "matplotlib", - "tqdm", - "graphviz", - "h5py", - "lightning", -] - setuptools.setup( - name="hippynn", version=versioneer.get_version(), - author="Nicholas Lubbers et al", - author_email="hippynn@lanl.gov", - python_requires=">=3.9", - install_requires=[ - "numpy", - "torch", - ], - extras_require={"docs": doc_requirements, "full": full_requirements}, - license="BSD 3-Clause License", - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3", - "Topic :: Scientific/Engineering :: Physics", - "Topic :: Scientific/Engineering :: Chemistry", - "Topic :: Software Development :: Libraries", - ], - description="The hippynn python package - a modular library for atomistic machine learning with pytorch", - long_description=long_description, packages=setuptools.find_packages(), cmdclass=versioneer.get_cmdclass(), -) +) \ No newline at end of file