diff --git a/.gitignore b/.gitignore index 94e2ff665..e7a3affb9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ imgaug/parameters-testcode.py imgaug/bak/* imgaug/quokka_depth_map.xcf +# Generated files +imgaug/__version__.py + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/imgaug/__init__.py b/imgaug/__init__.py index fafbc1973..4919b48fe 100644 --- a/imgaug/__init__.py +++ b/imgaug/__init__.py @@ -13,4 +13,4 @@ import imgaug.dtypes as dtypes import imgaug.data as data -__version__ = '0.4.0' +from .__version__ import __version__ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..f1d95b3e8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,83 @@ +[build-system] +requires = ["setuptools>=61.2.0", "wheel", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[project] +name = "imgaug" +authors = [{name = "Alexander Jung", email = "kontakt@ajung.name"}] +license = {text = "MIT"} +description = "Image augmentation library for deep neural networks" +keywords = [ + "augmentation", + "image", + "deep learning", + "neural network", + "CNN", + "machine learning", + "computer vision", + "overfitting", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Image Recognition", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "six", + "numpy>=1.15", + "scipy", + "Pillow", + "matplotlib", + "scikit-image>=0.14.2", + "imageio<=2.6.1; python_version<'3.5'", + "imageio; python_version>='3.5'", + "Shapely", +] +dynamic = ["version"] + +[project.readme] +text = """ +A library for image augmentation in machine learning experiments, particularly convolutional +neural networks. Supports the augmentation of images, keypoints/landmarks, bounding boxes, heatmaps and segmentation +maps in a variety of different ways.""" +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Homepage = "https://github.com/aleju/imgaug" +Download = "https://github.com/aleju/imgaug/archive/0.4.0.tar.gz" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages] +find = {namespaces = false} + +[tool.setuptools.package-data] +"*" = ["LICENSE"] # README.md; requirements.txt +imgaug = [ + "DejaVuSans.ttf", + "quokka.jpg", + "quokka_annotations.json", + "quokka_depth_map_halfres.png", +] +"imgaug.checks" = ["README.md"] + + +[tool.setuptools_scm] +write_to = "imgaug/__version__.py" +write_to_template = "__version__ = '{version}'\n" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b88034e41..000000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md diff --git a/setup.py b/setup.py index 711e25601..6099b555a 100644 --- a/setup.py +++ b/setup.py @@ -4,10 +4,6 @@ from pkg_resources import get_distribution, DistributionNotFound from setuptools import setup, find_packages -long_description = """A library for image augmentation in machine learning experiments, particularly convolutional -neural networks. Supports the augmentation of images, keypoints/landmarks, bounding boxes, heatmaps and segmentation -maps in a variety of different ways.""" - INSTALL_REQUIRES = [ "six", "numpy>=1.15", @@ -56,43 +52,4 @@ def get_install_requirements(main_requires, alternative_requires): INSTALL_REQUIRES = get_install_requirements(INSTALL_REQUIRES, ALT_INSTALL_REQUIRES) -setup( - name="imgaug", - version="0.4.0", - author="Alexander Jung", - author_email="kontakt@ajung.name", - url="https://github.com/aleju/imgaug", - download_url="https://github.com/aleju/imgaug/archive/0.4.0.tar.gz", - install_requires=INSTALL_REQUIRES, - packages=find_packages(), - include_package_data=True, - package_data={ - "": ["LICENSE", "README.md", "requirements.txt"], - "imgaug": ["DejaVuSans.ttf", "quokka.jpg", "quokka_annotations.json", "quokka_depth_map_halfres.png"], - "imgaug.checks": ["README.md"] - }, - license="MIT", - description="Image augmentation library for deep neural networks", - long_description=long_description, - keywords=["augmentation", "image", "deep learning", "neural network", "CNN", "machine learning", - "computer vision", "overfitting"], - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Scientific/Engineering :: Image Recognition", - "Topic :: Software Development :: Libraries :: Python Modules" - ] -) +setup(install_requires=INSTALL_REQUIRES)