Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make twine work without a config file #143

Closed
jankatins opened this issue Oct 22, 2015 · 6 comments
Closed

Make twine work without a config file #143

jankatins opened this issue Oct 22, 2015 · 6 comments
Milestone

Comments

@jankatins
Copy link
Contributor

I wanted to add twine to a CI script but it wasn't trivial to find the pypirc file, so I had to regenerate via echo "..." calls (windows).

It would be nice of twine could work with https://testpypi.python.org/pypi without first adding a config file .

@sigmavirus24 sigmavirus24 modified the milestone: next Oct 28, 2015
@johnnoone
Copy link

👍

@sigmavirus24
Copy link
Member

@johnnoone is that a 👍 you'd like to tackle this or a 👍 for some other reason? If you're in favor of this feature, could you please articulate why you're in favor of it and how you plan to use it? That would be far more helpful than a 👍

@jankatins
Copy link
Contributor Author

@sigmavirus24 Would you take a PR which enables twine to get the username and password from the environment?

@jankatins
Copy link
Contributor Author

Usage: set these variables via the CI UI (e.g by using a secure string in .travis.yml or the web UI). Using a file is cumbersome (decrypt with openssl or so) and using a direct call is a nogo as this gives away your password via the freely available .travis.yml file

@johnnoone
Copy link

I would like to publish automatically my packages in a in-house repository when it pass all checks.

Making config file optional and adding a 'repository-url' parameter would improve CI workflow.

This is an example of an actual CI scripts:

python -m pip install twine wheel
python setup.py sdist bdist_wheel
cat <<- EOF > .pypirc
    [$REPOSITORY]
    repository: $URL
    username: $USER
    password: $PASSWORD
EOF
twine upload --config-file .pypirc -r $REPOSITORY dist/*

And the same with an hypothetical repository-url parameter:

python -m pip install twine wheel
python setup.py sdist bdist_wheel
twine upload -u $USER -p $PASSWORD --repository-url $URL dist/*

@jankatins
Copy link
Contributor Author

Implementing #144 (comment) would help for password and username... Then it only needs an additional --repository-url switch, or do I miss something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants