From 8b460aa0232cd841af7b7734c91982bc83486e03 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Sun, 5 Mar 2023 19:14:11 +0100 Subject: build fixes --- setup.py | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 43bdd32..b1f5b2c 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,28 @@ from setuptools import setup, find_packages import os +extras = { + # NOTE: an 'all' extra is added automatically + 'features': [ + # image feature extractors + 'numpy', + ], + 'preview': [ + # preview readers + 'preview_generator', # also depends on some system packages + 'pillow', + 'rawpy', + ], + 'image': [ + # image readers + 'pillow', + 'rawpy', + # exif reader + 'pyexiv2', + ], + } + + setup( # package metadata name='bsie', @@ -9,14 +31,15 @@ setup( author='Matthias Baumgartner', author_email='dev@bsfs.io', description='Extract information from files and store them in a BSFS.', - long_description=open(os.path.join(os.path.dirname(__file__), 'README')).read(), + long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(), license='BSD', license_files=('LICENSE', ), url='https://www.bsfs.io/bsie/', download_url='https://pip.bsfs.io', # packages - packages=[p for p in find_packages() if p.startswith('bsie')], + packages=find_packages(include=['bsie']), + package_dir={'bsie': 'bsie'}, # data files are included if mentioned in MANIFEST.in include_package_data=True, @@ -31,18 +54,20 @@ setup( python_requires=">=3.7", install_requires=( 'bsfs', - # filematcher 'pyparsing', 'python-magic', + 'pyyaml', ), - extra_require=( - # image feature extractors - 'numpy', - # preview reader - 'preview_generator', # also depends on some system packages - # image reader - 'pillow', - 'rawpy', - ) -) + extras_require=dict( + # development targets + build=['build'], + dev=['coverage', 'mypy', 'pylint'], + doc=['sphinx', 'sphinx-copybutton', 'furo'], + test=['rdflib', 'requests', 'types-PyYAML'], + # add 'all' + all=list({pkg for ext in extras.values() for pkg in ext}), + # add extras + **extras + ), + ) -- cgit v1.2.3