diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4184f90 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,56 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "pidng" +version = "4.0.9" +description = "Python utility for creating Adobe DNG files from RAW image data." +readme = { file = "README.md", content-type = "text/markdown" } +license = "MIT" +authors = [ + {name = "Csaba Nagy"} +] +requires-python = ">=3.6" +dependencies = [ + "numpy", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", + "Topic :: Multimedia :: Graphics :: Graphics Conversion", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "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", +] + +[project.urls] +Homepage = "https://github.com/schoolpost/PiDNG" + +[tool.setuptools.packages.find] +where = ["src"] +include = ["pidng*"] + +# Ensure non-Python files needed for building are included in distributions +[tool.setuptools.package-data] +"pidng" = [ + "liblj92/*.h", +] + +[[tool.setuptools.ext-modules]] +name = "ljpegCompress" +sources = [ + "src/pidng/bitunpack.c", + "src/pidng/liblj92/lj92.c" +] +include-dirs = [ + "src/pidng", +] +extra-compile-args = ["-std=gnu99"] +extra-link-args = [] diff --git a/setup.py b/setup.py deleted file mode 100644 index 49ee496..0000000 --- a/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# from distutils.core import setup, Extension -from setuptools import setup, Extension, find_packages - -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() - -ljpeg92 = Extension('ljpegCompress', sources=[ - "src/pidng/bitunpack.c", "src/pidng/liblj92/lj92.c"], extra_compile_args=['-std=gnu99'], extra_link_args=[]) - -setup( - name="pidng", - include_package_data=True, - version="4.0.9", - author="Csaba Nagy", - description="Python utility for creating Adobe DNG files from RAW image data.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/schoolpost/PiDNG", - install_requires=[ - 'numpy', - ], - classifiers=[ - 'Development Status :: 4 - Beta', - "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", - "Topic :: Multimedia :: Graphics :: Graphics Conversion", - "Programming Language :: Python :: 3.6", - "License :: OSI Approved :: MIT License", - ], - ext_modules=[ljpeg92], - package_dir={"": "src"}, - packages=find_packages(where="src"), - python_requires='>=3.6', -) \ No newline at end of file