I have a public python project on github. It's is only meant to be run on windows. I'd like to add it to pypi so that people can install it via
pip install mypackage
Is there a way to store my package on github instead of using an aws s3 bucket? If yes, how? I need to also know what's the expected format. Am I supposed to make a package folder and put mypackage-1.0.tar.gz in it eventhough this is meant for windows?
I've already read this: http://docs.python-guide.org/en/latest/shipping/packaging/
so far, when I run pip install https://github.com/my_username/mypackage I get this error:
Downloading from URL https://github.com/my_username/mypackage Cleaning up... Exception: Traceback (most recent call last): File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\basecommand.py", line 122, in main status = self.run(options, args) File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\commands\install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\req.py", line 1197, in prepare_files do_download, File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\req.py", line 1375, in unpack_url self.session, File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\download.py", line 582, in unpack_http_url unpack_file(temp_location, location, content_type, link) File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\util.py", line 627, in unpack_file and is_svn_page(file_contents(filename))): File "C:\Python27\lib\site-packages\pip-1.5.6-py2.7.egg\pip\util.py", line 210, in file_contents return fp.read().decode('utf-8') File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte
I also figured out that I must write setup.py and setup.cfg and then I can run
python setup.py build
python setup.py register
>>Registering mypackage to http://pypi.python.org/pypi
>>Server response (401): basic auth failed
I do not know why the registration fails. Also tried:
python setup.py sdist register upload
which complains as in: PyPi issues - Upload failed (401): You must be identified to edit package information but creating .pypirc did not fix the problem. Any ideas how to get my package added to pypi?