Skip to content
Snippets Groups Projects
Commit 24c7f855 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Transform setup metadata to use pyproject.toml instead of setup.py+setup.cfg.


Signed-off-by: default avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 910c28c1
No related branches found
Tags v0.20.1
1 merge request!108Maintenance/modernize setup
Pipeline #76964 failed
......@@ -83,11 +83,9 @@ test_enpt_install:
# install enpt
- pip install -e .
- cd ..
- pwd
- ls
# test importability
- cd ../..
- python -c "import enpt; print(enpt)"
- python -c "from enpt.model.images import EnMAPL1Product_SensorGeo"
......@@ -96,6 +94,7 @@ test_enpt_install:
only:
- main
- dev
- maintenance/modernize_setup
pages:
......
......@@ -2,10 +2,11 @@
History
=======
0.20.3 (coming soon)
0.21.0 (coming soon)
--------------------
* Adapted CI runner build script to upstream changes in GitLab 17.0.
* !108: Migrated setup procedure from using setup.py + setup.cfg to using pyproject.toml only. Dropped requirements.txt.
0.20.2 (2024-05-30)
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# EnPT, EnMAP Processing Tool - A Python package for pre-processing of EnMAP Level-1B data
......@@ -28,95 +27,124 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
from setuptools import setup, find_packages
__author__ = 'Daniel Scheffler'
[build-system]
requires = [
"setuptools>=61.2",
"setuptools-git",
]
build-backend = "setuptools.build_meta"
[project]
name = "enpt"
description = "EnMAP Processing Tool"
authors = [
{name = "Daniel Scheffler", email = "daniel.scheffler@gfz-potsdam.de"},
{name = "Niklas Bohn", email = "nbohn@gfz-potsdam.de"},
{name = "Stéphane Guillaso", email = "stephane.guillaso@gfz-potsdam.de"},
{name = "Brenner Silva", email = "brenner.silva@awi.de"},
{name = "Leonardo Alvarado", email = "leonardo.alvarado@awi.de"},
{name = "Karl Segl", email = "segl@gfz-potsdam.de"},
]
maintainers = [
{name = "Daniel Scheffler", email = "daniel.scheffler@gfz-potsdam.de"},
]
license = {text = "GPL-3.0-or-later"}
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
keywords = [
"EnPT",
"EnMAP",
"EnMAP-Box",
"hyperspectral",
"remote sensing",
"satellite",
"processing chain"
]
requires-python = ">=3.8"
dependencies = [
"acwater>=0.3.0",
"arosics>=1.0.0",
"cerberus",
"gdal",
"geoarray>=0.15.8",
"jsmin",
"lxml",
"matplotlib",
"mvgavg",
"natsort",
"numpy",
"numpy-indexed",
"packaging",
"pandas",
"py_tools_ds>=0.14.25",
"pyproj>=3.4.0",
"scikit-image",
"scipy",
"sensormapgeo>=1.0.0",
"sicor>=0.19.1",
"tqdm",
"utm",
]
dynamic = ["version"]
with open('README.rst') as readme_file:
readme = readme_file.read()
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
version = {}
with open("enpt/version.py", encoding='utf-8') as version_file:
exec(version_file.read(), version)
[project.urls]
"Source code" = "https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT"
"Issue Tracker" = "https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT/-/issues"
"Documentation" = "https://enmap.git-pages.gfz-potsdam.de/GFZ_Tools_EnMAP_BOX/EnPT/doc"
"Change log" = "https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT/-/blob/main/HISTORY.rst"
"Zenodo" = "https://zenodo.org/records/8229436"
req = [
'acwater>=0.3.0',
'arosics>=1.0.0',
'cerberus',
'gdal',
'geoarray>=0.15.8',
'jsmin',
'lxml',
'matplotlib',
'mvgavg',
'natsort',
'numpy',
'numpy-indexed',
'packaging',
'pandas',
'pyproj>=3.4.0',
'py_tools_ds>=0.14.25',
'scikit-image',
'scipy',
'sensormapgeo>=1.0.0',
'sicor>=0.19.1',
'tqdm',
'utm',
[project.optional-dependencies]
doc = [
"sphinx-argparse",
"sphinx_rtd_theme",
]
test = [
"pytest",
"pytest-cov",
"pytest-reporter-html1",
"urlchecker",
]
lint = [
"flake8",
"pycodestyle",
"pydocstyle",
]
dev = [
"enpt[test]",
"enpt[doc]",
"enpt[lint]",
]
req_setup = ['setuptools-git'] # needed for package_data version controlled by GIT
req_test = ['pytest', 'pytest-cov', 'pytest-reporter-html1', 'urlchecker']
[project.scripts]
arosics = "enpt.cli:main"
req_doc = ['sphinx-argparse', 'sphinx_rtd_theme']
[tool.setuptools]
zip-safe = false
include-package-data = true
license-files = ["LICENSE"]
req_lint = ['flake8', 'pycodestyle', 'pydocstyle']
[tool.setuptools.packages.find]
exclude = [
"docs*",
"examples*",
"tests*",
]
namespaces = false
req_dev = req_setup + req_test + req_doc + req_lint
[tool.setuptools.dynamic]
version = {attr = "enpt.version.__version__"}
setup(
author="Karl Segl, Daniel Scheffler, Niklas Bohn, Stéphane Guillaso, Brenner Silva, Leonardo Alvarado",
author_email="segl@gfz-potsdam.de, danschef@gfz-potsdam.de, nbohn@gfz-potsdam.de, "
"stephane.guillaso@gfz-potsdam.de, brenner.silva@awi.de, leonardo.alvarado@awi.de",
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: English',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
description="EnMAP Processing Tool",
entry_points={
'console_scripts': [
'enpt=enpt.cli:main',
],
},
extras_require={
"doc": req_doc,
"test": req_test,
"lint": req_lint,
"dev": req_dev
},
keywords=['EnPT', 'EnMAP', 'EnMAP-Box', 'hyperspectral', 'remote sensing', 'satellite', 'processing chain'],
include_package_data=True,
install_requires=req,
license="GPL-3.0-or-later",
long_description=readme,
long_description_content_type='text/x-rst',
name='enpt',
package_dir={'enpt': 'enpt'},
# NOTE: if the 'package_data' files are not under CVS or Subversion version control, we need setuptools-git here,
# otherwise they are not included in the PyPI upload content
package_data={"enpt": ["resources/**/**/*"]},
packages=find_packages(exclude=['tests*', 'examples*']), # does not seem to work, therefore use MANIFEST.in
python_requires='>=3.8',
setup_requires=req_setup,
test_suite='tests',
tests_require=req_test,
url='https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT',
version=version['__version__'],
zip_safe=False
)
[tool.distutils.bdist_wheel]
universal = 1
[bumpversion]
current_version = 0.1.0
commit = True
tag = True
[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:enpt/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bdist_wheel]
universal = 1
[flake8]
exclude = docs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment