From b4713362ac6d5fb9c6a0a1a2e69b591d2285e54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Fri, 24 Nov 2023 16:29:37 +0100 Subject: [PATCH] Test pyproject.toml --- .github/workflows/deploy.yml | 2 +- pyproject.toml | 63 ++++++++++++++++++++++++++++++++++++ setup.py | 45 ++------------------------ 3 files changed, 66 insertions(+), 44 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f567fa45..7e245cba 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: python -m pip install --user --upgrade setuptools wheel - name: Convert dependencies run: >- - sed -i 's/==/>=/g' setup.py; cat setup.py + sed -i 's/==/>=/g' pyproject.toml; cat pyproject.toml - name: Build run: >- python setup.py sdist bdist_wheel diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..94003ae9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,63 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "atomistics" +description = "Interfaces for atomistic simulation codes and workflows" +authors = [ + { name = "Jan Janssen", email = "janssen@mpie.de" }, +] +readme = "README.md" +license = { file = "LICENSE" } +keywords = ["pyiron"] +requires-python = ">=3.8" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Topic :: Scientific/Engineering :: Physics", + "License :: OSI Approved :: BSD License", + "Intended Audience :: Science/Research", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dependencies = [ + "ase==3.22.1", + "numpy==1.26.0", + "scipy==1.11.3", + "spglib==2.1.0", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/pyiron/atomistics" +Documentation = "https://atomistics.readthedocs.io" +Repository = "https://github.com/pyiron/atomistics" + +[project.optional-dependencies] +phonopy = [ + "phonopy==2.20.0", + "seekpath==2.1.0", + "structuretoolkit==0.0.12", +] +gpaw = [ + "gpaw==23.9.1", +] +lammps = [ + "pylammpsmpi==0.2.6", + "jinja2==3.1.2", + "pandas==2.1.3", +] + +[tool.setuptools] +packages = ["atomistics"] + +[tool.versioneer] +VCS = "git" +style = "pep440" +versionfile_source = "atomistics/_version.py" +parentdir_prefix = "atomistics" +tag_prefix = "atomistics-" diff --git a/setup.py b/setup.py index b712095f..fc1f76c8 100644 --- a/setup.py +++ b/setup.py @@ -1,44 +1,3 @@ -""" -Setuptools based setup module -""" -from setuptools import setup, find_packages -from pathlib import Path -import versioneer +from setuptools import setup -setup( - name='atomistics', - version=versioneer.get_version(), - description='atomistics - materials science workgflows to calculate material properties', - long_description=Path("README.md").read_text(), - long_description_content_type='text/markdown', - url='https://github.com/pyiron/atomistics', - author='Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department', - author_email='janssen@mpie.de', - license='BSD', - - classifiers=['Development Status :: 5 - Production/Stable', - 'Topic :: Scientific/Engineering :: Physics', - 'License :: OSI Approved :: BSD License', - 'Intended Audience :: Science/Research', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11' - ], - - keywords='pyiron', - packages=find_packages(exclude=["*tests*", "*docs*", "*binder*", "*conda*", "*notebooks*", "*.ci_support*"]), - install_requires=[ - 'ase==3.22.1', - 'numpy==1.26.0', - 'scipy==1.11.3', - 'spglib==2.1.0', - ], - extras_require={ - "phonopy": ['phonopy==2.20.0', 'seekpath==2.1.0', 'structuretoolkit==0.0.12'], - "gpaw": ['gpaw==23.9.1'], - "lammps": ['pylammpsmpi==0.2.6', 'jinja2==3.1.2', 'pandas==2.1.3'] - }, - cmdclass=versioneer.get_cmdclass(), -) +setup() \ No newline at end of file