-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
78 lines (73 loc) · 2.54 KB
/
setup.py
File metadata and controls
78 lines (73 loc) · 2.54 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# WARNING: this is quicklib's own setup.py.
# it is NOT an example of how to write a setup.py that USES quicklib.
# if you're looking for an example, look at `examplelibrary/setup.py`.
import os
import sys
from setuptools import setup, find_packages
cmdclass = {}
version_module_path = os.path.join(os.path.dirname(__file__), "quicklib", "version.py")
is_packaging = not os.path.exists("PKG-INFO")
if is_packaging:
from quicklib.setupapi import SetupModifier
from quicklib.incorporator import CreateIncorporatedZip
from quicklib.virtualfiles import UndoVirtualFiles
cmdclass.update(SetupModifier.get_quicklib_commands())
cmdclass.update({
CreateIncorporatedZip.SHORTNAME: CreateIncorporatedZip,
UndoVirtualFiles.SHORTNAME: UndoVirtualFiles,
})
version = None
else:
import quicklib
version = quicklib.read_module_version(version_module_path)
long_description = open("README.rst", "r").read()
script_args = sys.argv[1:]
if is_packaging:
script_args = (
["clean_egg_info", "version_set_by_git", "create_incorporated_zip"] +
script_args +
["undo_virtual_files"]
)
setup(
name='quicklib',
version=version,
url="https://github.com/yonatanp/quicklib",
author='Yonatan Perry',
author_email='yonatan.perry@gmail.com',
description='quicklib: hassle-free setup scripts for your python libraries',
long_description=long_description,
license='MIT',
install_requires=[
'yarg~=0.1.9',
'PyYAML>=4.2b1',
],
tests_require=[],
python_requires=">=3.7",
packages=find_packages(),
package_data={'quicklib': ['quicklib_incorporated.zip']},
platforms='any',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: OS Independent',
],
zip_safe=False,
cmdclass=cmdclass,
script_args=script_args,
command_options={
'version_set_by_git': {'version_module_paths': ('setup.py', version_module_path)},
},
entry_points={
'console_scripts': [
'quicklib-setup = quicklib.cli.quicklibsetup:main',
# utilities
'quicklib-get-git-version = quicklib.versioning:calculate_git_version',
],
},
)