Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
print("\ncheck git tag")
call_info, output = verbose_check_output("git", "log", "HEAD..origin/master", "--oneline")
if git_tag in output:
print("\n *** ERROR: git tag %r already exists!" % git_tag)
print(output)
sys.exit(-1)
else:
print("OK")
print("\nUpload with twine:")
twine_args = sys.argv[1:]
twine_args.remove("publish")
twine_args.insert(1, "dist/*")
print("\ttwine upload command args: %r" % " ".join(twine_args))
from twine.commands.upload import main as twine_upload
twine_upload(twine_args)
print("\ngit tag version")
verbose_check_call("git", "tag", git_tag)
print("\ngit push tag to server")
verbose_check_call("git", "push", "--tags")
sys.exit(0)
setup(
name='python-creole',
version=__version__,
description='python-creole is an open-source (GPL) markup converter in pure Python for: creole2html, html2creole, html2ReSt, html2textile',
long_description=long_description,
author=get_authors(),
call_info, output = verbose_check_output(
"git", "log", "HEAD..origin/master", "--oneline")
if git_tag in output:
print("\n *** ERROR: git tag %r already exists!" % git_tag)
print(output)
sys.exit(-1)
else:
print("OK")
print("\nUpload with twine:")
twine_args = sys.argv[1:]
twine_args.remove("publish")
twine_args.insert(1, "dist/*")
print("\ttwine upload command args: %r" % " ".join(twine_args))
from twine.commands.upload import main as twine_upload
twine_upload(twine_args)
print("\ngit tag version")
verbose_check_call("git", "tag", git_tag)
print("\ngit push tag to server")
verbose_check_call("git", "push", "--tags")
sys.exit(0)
def get_authors():
try:
with open(os.path.join(PACKAGE_ROOT, "AUTHORS"), "r") as f:
authors = [
l.strip(" *\r\n") for l in f if l.strip().startswith("*")
]
print("\ncheck git tag")
call_info, output = verbose_check_output("git", "log", "HEAD..origin/master", "--oneline")
if git_tag in output:
print("\n *** ERROR: git tag %r already exists!" % git_tag)
print(output)
sys.exit(-1)
else:
print("OK")
print("\nUpload with twine:")
twine_args = sys.argv[1:]
twine_args.remove("publish")
twine_args.insert(1, "dist/*")
print("\ttwine upload command args: %r" % " ".join(twine_args))
from twine.commands.upload import main as twine_upload
twine_upload(twine_args)
print("\ngit tag version")
verbose_check_call("git", "tag", git_tag)
print("\ngit push tag to server")
verbose_check_call("git", "push", "--tags")
sys.exit(0)
classifiers = """
Development Status :: 4 - Beta
# Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: POSIX
call_info, output = verbose_check_output("git", "log", "HEAD..origin/master", "--oneline")
if git_tag in output:
print("\n *** ERROR: git tag %r already exists!" % git_tag)
print(output)
sys.exit(-1)
else:
print("OK")
print("\nUpload with twine:")
twine_args = sys.argv[1:]
twine_args.remove("publish")
twine_args.insert(1, "dist/*")
print("\ttwine upload command args: %r" % " ".join(twine_args))
from twine.commands.upload import main as twine_upload
twine_upload(twine_args)
print("\ngit tag version")
verbose_check_call("git", "tag", git_tag)
print("\ngit push tag to server")
verbose_check_call("git", "push", "--tags")
sys.exit(0)
def after_install_callback(bin_dir):
"""
:param bin_dir: e.g.: /home//DjangoForRunnersEnv/bin
Note: print outputs can only be seen in "--verbose" mode!
"""
print("\ncheck git tag")
call_info, output = verbose_check_output("git", "log", "HEAD..origin/master", "--oneline")
if git_tag in output:
print("\n *** ERROR: git tag %r already exists!" % git_tag)
print(output)
sys.exit(-1)
else:
print("OK")
print("\nUpload with twine:")
twine_args = sys.argv[1:]
twine_args.remove("publish")
twine_args.insert(1, "dist/*")
print("\ttwine upload command args: %r" % " ".join(twine_args))
from twine.commands.upload import main as twine_upload
twine_upload(twine_args)
print("\ngit tag version")
verbose_check_call("git", "tag", git_tag)
print("\ngit push tag to server")
verbose_check_call("git", "push", "--tags")
sys.exit(0)
setup(
name='PyLucid',
version=__version__,
description='PyLucid CMS',
long_description=long_description,
def run(self):
from twine.commands import upload
from devops import PROJECT_PACKAGE
assert hasattr(PROJECT_PACKAGE, 'PROJECT_DIR'), "No PROJECT_DIR variable declared"
assert PROJECT_PACKAGE.PROJECT_DIR, "No PROJECT_DIR variable injected"
distributions = [
path.as_posix() for path in
Path(PROJECT_PACKAGE.PROJECT_DIR).glob(self.distributions_glob)
if path.is_file()
]
return upload.main(distributions)
def _upload(dist, upload_repo):
from twine.commands import upload
_check_wheel_metadata_version(dist)
args = _twine_upload_args(dist, upload_repo)
try:
upload.main(args)
except Exception as e:
_handle_twine_error(e)