-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·56 lines (48 loc) · 1.5 KB
/
setup.py
File metadata and controls
executable file
·56 lines (48 loc) · 1.5 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
#!python3
import os
import shutil
import sys
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
packages = ['gitflic']
requires = ['requests']
# 'setup.py publish' shortcut.
if 'publish' in sys.argv:
# Only if packages == 1
for directory in ("./dist", f"{packages[0]}.egg-info"):
if os.path.isdir(directory):
shutil.rmtree(directory)
os.system('python3 -m build')
os.system('python3 -m twine upload --repository testpypi dist/*')
os.system('python3 -m twine upload --repository pypi dist/*')
sys.exit(0)
about = {}
with open(os.path.join(here, 'gitflic', '__version__.py'), 'r', encoding='utf-8') as f:
exec(f.read(), about)
with open('README.md', 'r', encoding='utf-8') as f:
readme = f.read()
setup(
name=about['__title__'],
version=about['__version__'],
description=about['__description__'],
long_description=readme,
long_description_content_type='text/markdown',
author=about['__author__'],
author_email=about['__author_email__'],
url=about['__url__'],
packages=packages,
package_data={'': ['LICENSE']},
package_dir={'gitflic': 'gitflic'},
include_package_data=True,
install_requires=requires,
license=about['__license__'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
project_urls={
'Source': about['__url__'],
},
python_requires=">=3.7",
)