-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
64 lines (57 loc) · 1.93 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
"""
This is the setup info for the python installer.
You probably don't need to do anything with it directly.
Just run make and it will be used to create a distributable package
for more info on how this works, see:
http://wheel.readthedocs.org/en/latest/
and/or
http://pythonwheels.com
"""
import typing
from setuptools import setup,Distribution # type: ignore # pylint: disable=import-error # noqa: E501
class BinaryDistribution(Distribution):
"""
Distribution info
"""
def is_pure(self):
"""
Yes, we are pure python
"""
return True # return False if there is OS-specific files
def cmdline(args:typing.Iterable[str])->int:
"""
Run the command line
:param args: command line arguments (WITHOUT the filename)
"""
import os
here=os.path.dirname(os.path.realpath(__file__))
name='gimpFormats'
# See also: https://setuptools.readthedocs.io/en/latest/setuptools.html
_=args
setup(
name=name,
version='1.0',
description='Pure python implementation of the gimp file format(s)',
long_description='Really, the funniest around.',
classifiers=[ # http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
#'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.9', # target python version
# 'Topic :: ', # file this under a topic
],
#url='http://myproduct.com',
#author='me',
#author_email='[email protected]',
#license='MIT',
packages=[name],
package_dir={name:here},
package_data={ # add extra files for a package
name:[]
},
distclass=BinaryDistribution,
install_requires=[], # add dependencies from pypi
dependency_links=[], # add dependency urls (not in pypi)
)
if __name__=='__main__':
import sys
cmdline(sys.argv[1:])