mirror of
https://gitflic.ru/project/santaspeen/gitflic.git
synced 2025-07-02 02:05:25 +00:00
./setup.py publish
This commit is contained in:
parent
2dd969db93
commit
01e9a9a879
16
setup.py
Normal file → Executable file
16
setup.py
Normal file → Executable file
@ -1,4 +1,6 @@
|
|||||||
|
#!python3
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
@ -10,11 +12,15 @@ packages = ['gitflic']
|
|||||||
requires = ['requests']
|
requires = ['requests']
|
||||||
|
|
||||||
# 'setup.py publish' shortcut.
|
# 'setup.py publish' shortcut.
|
||||||
if sys.argv[-1] == 'publish':
|
if 'publish' in sys.argv:
|
||||||
os.system('py -m build')
|
# Only if packages == 1
|
||||||
os.system('py -m twine upload --repository testpypi dist/*')
|
for dir in ("./dist", f"{packages[0]}.egg-info"):
|
||||||
os.system('py -m twine upload --repository pypi dist/*')
|
if os.path.isdir(dir):
|
||||||
sys.exit()
|
shutil.rmtree(dir)
|
||||||
|
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 = {}
|
about = {}
|
||||||
with open(os.path.join(here, 'gitflic', '__version__.py'), 'r', encoding='utf-8') as f:
|
with open(os.path.join(here, 'gitflic', '__version__.py'), 'r', encoding='utf-8') as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user