diff options
author | jaseg <git@jaseg.de> | 2021-09-29 21:41:10 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-09-29 21:41:10 +0200 |
commit | bc54e8233f614a905884c75ed70b15daef156ac9 (patch) | |
tree | b6966c2dd684673b21d7578eb1bb1b7e076e4a48 | |
parent | 29c8245d0a28d70851b0be8635a88cf2c70316f0 (diff) | |
download | gerbolyze-2.2.3.tar.gz gerbolyze-2.2.3.tar.bz2 gerbolyze-2.2.3.zip |
pypi/gerbolyze: add extra dep on svg-flatten-wasi pkgv2.2.3
-rwxr-xr-x | setup.py | 34 | ||||
-rw-r--r-- | svg-flatten/setup.py | 3 |
2 files changed, 16 insertions, 21 deletions
@@ -8,32 +8,18 @@ import subprocess from multiprocessing import cpu_count from pathlib import Path +def version(): + res = subprocess.run(['git', 'describe', '--tags', '--match', 'v*'], capture_output=True, check=True, text=True) + version, _, _rest = res.stdout.strip()[1:].partition('-') + return version + def readme(): with open('README.rst') as f: return f.read() -def compile_and_install_svgflatten(target_dir): - src_path = 'svg-flatten' - - try: - subprocess.run(['make', '-j', str(cpu_count()), 'all'], cwd=src_path, check=True) - bin_dir = target_dir / ".." - bin_dir.mkdir(parents=True, exist_ok=True) - subprocess.run(['make', 'install', f'PREFIX={bin_dir.resolve()}'], cwd=src_path, check=True) - except subprocess.CalledProcessError: - print('Error building svg-flatten C++ binary. Please see log above for details.', file=sys.stderr) - sys.exit(1) - -class CustomInstall(install): - """Custom handler for the 'install' command.""" - def run(self): - compile_and_install_svgflatten(Path(self.install_scripts)) - super().run() - setup( - cmdclass={'install': CustomInstall}, name = 'gerbolyze', - version = '2.1.1', + version = version(), py_modules = ['gerbolyze'], package_dir = {'': 'gerbolyze'}, entry_points = ''' @@ -47,10 +33,16 @@ setup( 'conversions to raster images accurately preserving the input.'), long_description=readme(), long_description_content_type='text/x-rst', - url = 'https://git.jaseg.de/gerbolyze', + project_urls={ + "Source Code": "https://git.jaseg.de/gerbolyze", + "Bug Tracker": "https://github.com/jaseg/gerbolyze/issues", + }, author = 'jaseg', author_email = 'github@jaseg.de', install_requires = ['pcb-tools', 'numpy', 'python-slugify', 'lxml', 'click', 'pcb-tools-extension'], + extras_require = { + 'wasi': [f'svg-flatten-wasi[resvg-wasi] >= {version()}'], + }, license = 'AGPLv3', classifiers = [ 'Development Status :: 5 - Production/Stable', diff --git a/svg-flatten/setup.py b/svg-flatten/setup.py index 6aa8fb9..06e813d 100644 --- a/svg-flatten/setup.py +++ b/svg-flatten/setup.py @@ -47,6 +47,9 @@ setup( "Bug Tracker": "https://github.com/jaseg/gerbolyze/issues", }, classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Console', "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + 'Topic :: Utilities' ], ) |