I want to use twine to upload a project build to test.pypi.org. I am following the README for the basic use case from the twine GitHub page. I have installed the latest version of twine:
$ twine --version
twine version 1.5.0 (pkginfo: 1.2.1, requests: 2.9.1, setuptools: 20.7.0)`
But when I attempt to upload my project built, I get the following error:
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
usage: twine upload [-h] [-r REPOSITORY] [-s] [--sign-with SIGN_WITH]
[-i IDENTITY] [-u USERNAME] [-p PASSWORD] [-c COMMENT]
dist [dist ...]
twine upload: error: unrecognized arguments: --repository-url
This is the exact line of code referenced on the Python Packaging Tutorial and the Twine README, and --repository-url should be a valid flag. Is this an error with the argument passed to the flag instead of the flag itself, and if so what is it exactly that I need to fix?
My setup.py file for the project:
import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name='MyPackageName',
version='0.1.0',
author='J. Chamness',
author_email='myEmail@gmail.com',
description='MyDescription',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://test.pypi.org/legacy/',
packages=setuptools.find_packages(),
classifiers=(
'Programming Language :: Python :: 3',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
),
)