Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_pypiserver_upload(pypiserver_instance, uploadable_dist):
command = [
"upload",
"--repository-url",
pypiserver_instance.url,
"--username",
"any",
"--password",
"any",
str(uploadable_dist),
]
cli.dispatch(command)
tag, tag_error = git_tag_proc.communicate()
if len(tag_error) > 0:
print(tag_error.decode('utf-8').rstrip(), file=sys.stderr)
print('Error looking for current git tag', file=sys.stderr)
return False
if len(tag) == 0:
print('No git tag found on HEAD', file=sys.stderr)
return False
tag = tag.decode('ascii').strip()
build()
twine.cli.dispatch(['upload', 'dist/%s-%s*' % (package_name, tag)])
if has_tests_package:
twine.cli.dispatch(['upload', 'dist/%s_tests-%s*' % (package_name, tag)])
return True
print(tag_error.decode('utf-8').rstrip(), file=sys.stderr)
print('Error looking for current git tag', file=sys.stderr)
return False
if len(tag) == 0:
print('No git tag found on HEAD', file=sys.stderr)
return False
tag = tag.decode('ascii').strip()
setuptools.sandbox.run_setup(
setup_file,
['sdist', 'bdist_wheel', '--universal']
)
twine.cli.dispatch(['upload', 'dist/%s-%s*' % (package_name, tag)])
setuptools.sandbox.run_setup(
setup_file,
['clean']
)
print(tag_error.decode('utf-8').rstrip(), file=sys.stderr)
print('Error looking for current git tag', file=sys.stderr)
return False
if len(tag) == 0:
print('No git tag found on HEAD', file=sys.stderr)
return False
tag = tag.decode('ascii').strip()
setuptools.sandbox.run_setup(
setup_file,
['sdist', 'bdist_wheel', '--universal']
)
twine.cli.dispatch(['upload', 'dist/%s-%s*' % (package_name, tag)])
setuptools.sandbox.run_setup(
setup_file,
['clean']
)
print(tag_error.decode('utf-8').rstrip(), file=sys.stderr)
print('Error looking for current git tag', file=sys.stderr)
return False
if len(tag) == 0:
print('No git tag found on HEAD', file=sys.stderr)
return False
tag = tag.decode('ascii').strip()
setuptools.sandbox.run_setup(
setup_file,
['sdist', 'bdist_wheel', '--universal']
)
twine.cli.dispatch(['upload', 'dist/certvalidator-%s*' % tag])
setuptools.sandbox.run_setup(
setup_file,
['clean']
)