-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use declarative setuptools configuration and PyPI build tools
- Loading branch information
Showing
6 changed files
with
62 additions
and
65 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
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
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,3 +1,7 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 |
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,41 @@ | ||
[metadata] | ||
name = xmipy | ||
version = attr: xmipy.__version__ | ||
description = xmipy is an extension to the bmipy Python package | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
author = Martijn Russcher, Julian Hofer, Joseph D. Hughes | ||
author_email = Martijn.Russcher@deltares.nl, Julian.Hofer@deltares.nl, jdhughes@usgs.gov | ||
license = CC0 | ||
license_files = LICENSE | ||
platform = Windows, Mac OS-X, Linux | ||
keywords = MODFLOW, groundwater, hydrogeology | ||
classifiers = | ||
Intended Audience :: Science/Research | ||
License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | ||
Topic :: Scientific/Engineering :: Hydrology | ||
url = https://github.com/Deltares/xmipy | ||
download_url = https://pypi.org/project/xmipy/ | ||
|
||
[options] | ||
zip_safe = False | ||
packages = find: | ||
python_requires = >=3.7 | ||
install_requires = | ||
bmipy | ||
numpy | ||
|
||
[options.extras_require] | ||
tests = | ||
pytest | ||
pytest-cov | ||
requests | ||
mfpymake | ||
flopy | ||
lint = | ||
mypy | ||
black | ||
isort | ||
|
||
[options.package_data] | ||
xmipy = py.typed |
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,60 +1,3 @@ | ||
import codecs | ||
import os.path | ||
import sys | ||
from setuptools import setup | ||
|
||
from setuptools import find_namespace_packages, setup | ||
|
||
# edit author dictionary as necessary | ||
author_dict = { | ||
"Martijn Russcher": "Martijn.Russcher@deltares.nl", | ||
"Julian Hofer": "Julian.Hofer@deltares.nl", | ||
"Joseph D. Hughes": "jdhughes@usgs.gov", | ||
} | ||
__author__ = ", ".join(author_dict.keys()) | ||
__author_email__ = ", ".join(s for _, s in author_dict.items()) | ||
|
||
|
||
def read(rel_path): | ||
here = os.path.abspath(os.path.dirname(__file__)) | ||
with codecs.open(os.path.join(here, rel_path), "r") as fp: | ||
return fp.read() | ||
|
||
|
||
def get_version(rel_path): | ||
for line in read(rel_path).splitlines(): | ||
if line.startswith("__version__"): | ||
delim = '"' if '"' in line else "'" | ||
return line.split(delim)[1] | ||
else: | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
long_description = read("README.md") | ||
|
||
|
||
setup( | ||
name="xmipy", | ||
description="xmipy is an extension to the bmipy Python package.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author=__author__, | ||
author_email=__author_email__, | ||
url="https://github.com/Deltares/xmipy.git", | ||
license="CC0", | ||
platforms="Windows, Mac OS-X, Linux", | ||
install_requires=["bmipy", "numpy"], | ||
extras_require={ | ||
"tests": ["pytest", "pytest-cov", "requests", "mfpymake", "flopy"], | ||
"lint": [ | ||
"mypy", | ||
"black", | ||
"isort", | ||
], | ||
}, | ||
python_requires=">=3.7", | ||
packages=find_namespace_packages(exclude=("tests", "examples")), | ||
package_data={"xmipy": ["py.typed"]}, | ||
version=get_version("xmipy/__init__.py"), | ||
classifiers=["Topic :: Scientific/Engineering :: Hydrology"], | ||
zip_safe=False, | ||
) | ||
setup() |
Empty file.