Skip to content

Commit

Permalink
change setup to include pyproject.toml file (#97)
Browse files Browse the repository at this point in the history
* change setup to include pyproject.toml file

* update github actions to use python -m build

* add build dependency intallation

* get versioneer with pyproject.toml support
  • Loading branch information
shinkle-lanl authored Sep 9, 2024
1 parent 10a9055 commit be79f3a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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",
]
41 changes: 1 addition & 40 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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(),
)
)

0 comments on commit be79f3a

Please sign in to comment.