This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: distutils register does not work from the command line
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: brian.curtin, eric.araujo, tarek, yac00b
Priority: normal Keywords:

Created on 2011-03-26 17:51 by yac00b, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg132258 - (view) Author: (yac00b) Date: 2011-03-26 17:51
I am not exactly sure if it is a proper place for my problem. I am quite new to Python in general.
I am working on Windows 7 with Python 3.2. I wanted to upload a module to PyPI. To do that I have to register with the command-line. I use the command "python3 setup.py register" and then I have to choose whether to use existing login, to create new etc. I am already registered on the website. When I choose 1 and press Enter, it still wants me to put a proper number.
I searched the web and I found out that the solution is to specify my username and password in the .pypirc file. The problem is that I have no idea where to find this file. Should I maybe create it? The ".pypirc" is the extension? What is the exact name of the file?
Or maybe is there any other way to solve this problem?
msg132286 - (view) Author: (yac00b) Date: 2011-03-27 01:42
I searched a little bit more and now I know that if the registration would be possible then the .pipyrc file would be created automatically. I would like to create it on my own to go around this problem, but Windows does not allow to create a file named .pypirc. How to deal with it?
msg132373 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-27 22:19
Thanks for reporting the bug.  Could you attach a text file containing a full transcript?  If possible, create a small, new setup.py and run that (it will enable me to try to reproduce the problem).

Could you give me the links you used?

To create a file starting with a dot, you can use Python (yay!):

with open(os.path.expanduser('~/.pypirc'), 'w') as file:
    file.write(
"""[section]
key = value
""")
msg132380 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-03-28 00:56
In the end, this is a duplicate of #11272 -- it's not specific to distutils but this is where the issue pops up. input() in 3.2.0 isn't working properly so you won't be able to run the register command. This is fixed for 3.2.1

In the meantime, you can run the register command with another version of Python.
History
Date User Action Args
2022-04-11 14:57:15adminsetgithub: 55896
2011-03-28 00:56:42brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg132380

resolution: duplicate
stage: resolved
2011-03-27 22:19:59eric.araujosetnosy: + tarek
2011-03-27 22:19:31eric.araujosettitle: Cannot register using command-line -> distutils register does not work from the command line
nosy: + eric.araujo

messages: + msg132373

assignee: eric.araujo
components: + Distutils, - Windows
2011-03-27 01:42:02yac00bsetmessages: + msg132286
2011-03-26 17:51:13yac00bcreate