use setuptools_scm for versioning

main
Andrew Cassidy 3 years ago
parent 5ea6222f70
commit c1d1a17599

@ -1,5 +1,3 @@
from pillow_mbm.version import __version__
import struct
from PIL import Image, ImageFile

@ -48,7 +48,8 @@ def path_pairs(inputs, output, suffix, extension):
raise click.BadOptionUsage('output', 'Output is a single file, but multiple input files were provided.')
if outpath.suffix not in decoded_extensions:
raise click.BadOptionUsage('output',
f'File has incorrect extension for decoded file. Valid extensions are:\n{decoded_extensions}')
f'File has incorrect extension for decoded file. Valid extensions are:\n'
f'{decoded_extensions}')
return [(inpath, outpath) for inpath in inpaths]
else:
@ -72,7 +73,7 @@ def path_pairs(inputs, output, suffix, extension):
"By default, files are decoded in place.")
@click.option('-v', '--verbose', is_flag=True, help="print more information")
@click.argument('filenames', nargs=-1, type=click.Path(exists=True, readable=True, dir_okay=False))
@click.version_option(version=pillow_mbm.__version__)
@click.version_option()
def convert_mbm(flip, remove, suffix, extension, output, verbose, filenames):
"""Decode Kerbal Space Program MBM files"""

@ -1 +0,0 @@
__version__ = '0.1.2'

@ -1,41 +0,0 @@
import os.path
from setuptools import setup
project_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(project_path, 'pillow_mbm', 'version.py')) as f:
exec(f.read())
with open(os.path.join(project_path, 'README.md')) as f:
readme = f.read()
setup(
name='pillow-mbm',
description="A pillow plugin that adds support for KSP's MBM textures",
version=__version__,
url='https://github.com/drewcassidy/Pillow-mbm',
author='Andrew Cassidy',
long_description=readme,
long_description_content_type='text/markdown',
python_requires=">=3.7",
install_requires=['Pillow', 'click'],
entry_points={
'console_scripts': ['convert-mbm = pillow_mbm.__main__:convert_mbm']
},
package_dir={'': '.'},
packages=['pillow_mbm'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Games/Entertainment :: Simulation',
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
],
)
Loading…
Cancel
Save