-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate from setup.py to pyproject.toml
- Loading branch information
Showing
3 changed files
with
68 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ jobs: | |
#- Windows | ||
#- MacOs | ||
py_version: | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
- "3.8" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=61.2", | ||
"cython~=0.29", | ||
"numpy~=1.21", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "fplore.__version__"} | ||
|
||
[project] | ||
name = "fplore" | ||
description = "FPLO run evaluation" | ||
requires-python = ">=3.8, <4" | ||
keywords = ["dft", "fplo", "physics", "chemistry"] | ||
license = {text = "GPLv3"} | ||
urls = {Homepage = "https://github.com/mueslo/fplore"} | ||
classifiers = [ | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Scientific/Engineering :: Chemistry", | ||
] | ||
dependencies = [ | ||
"numpy~=1.21", | ||
"scipy~=1.7", | ||
"pymatgen~=2022.5.19", | ||
"orderedattrdict~=1.5", | ||
"logbook~=1.5", | ||
"pyparsing~=2.4", | ||
"progressbar2~=3.38", | ||
"matplotlib~=3.4", | ||
"Pint~=0.17", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
"tox", | ||
] | ||
docs = [ | ||
"sphinx~=4.5", | ||
"sphinx-gallery~=0.10", | ||
"Pillow", | ||
] | ||
|
||
[tool.setuptools] | ||
include-package-data = false | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["contrib", "docs", "tests"] | ||
namespaces = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
from setuptools import setup, find_packages, Extension | ||
import codecs | ||
import re | ||
from os import path | ||
|
||
here = path.abspath(path.dirname(__file__)) | ||
|
||
|
||
def read(*parts): | ||
with codecs.open(path.join(here, *parts), 'r') as fp: | ||
return fp.read() | ||
|
||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
from setuptools import setup, Extension | ||
|
||
|
||
setup( | ||
name='fplore', | ||
version=find_version("fplore", "__init__.py"), | ||
description="FPLO run evaluation", | ||
long_description=open('README.md', 'r').read(), | ||
long_description_content_type='text/markdown', | ||
license='GPLv3', | ||
url='https://github.com/mueslo/fplore', | ||
ext_modules=[Extension('fplore.fast_util', sources=['fplore/fast_util.pyx']),], | ||
packages=find_packages(exclude=['contrib', 'docs', 'tests']), | ||
install_requires=[ | ||
"numpy~=1.21", | ||
"scipy~=1.7", | ||
"pymatgen~=2022.5.19", | ||
"orderedattrdict~=1.5", | ||
"logbook~=1.5", | ||
"pyparsing~=2.4", | ||
"progressbar2~=3.38", | ||
"matplotlib~=3.4", | ||
"Pint~=0.17", | ||
], | ||
python_requires=">=3.8, <4", # see also docs, test, ci config | ||
extras_require={ | ||
'tests': ['tox'], | ||
'docs': [ | ||
'sphinx~=4.5', | ||
'sphinx-gallery~=0.10', | ||
'Pillow', | ||
], | ||
}, | ||
setup_requires=['cython'], | ||
classifiers=[ | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Scientific/Engineering :: Chemistry", | ||
ext_modules=[ | ||
Extension('fplore.fast_util', sources=['fplore/fast_util.pyx']), | ||
], | ||
) |