Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Python Package #3

Merged
merged 2 commits into from
Sep 10, 2018
Merged

Python Package #3

merged 2 commits into from
Sep 10, 2018

Conversation

undu
Copy link
Contributor

@undu undu commented Sep 9, 2018

This makes sequestrum installable using pip, and friendlier to distro packagers.

@buffet
Copy link
Contributor

buffet commented Sep 10, 2018

Also:

  • Added .gitignore
  • Restructed a little (source -> sequestrum)

@undu
Copy link
Contributor Author

undu commented Sep 10, 2018

The second is a necessity for having a python package with an executable :)

@buffet
Copy link
Contributor

buffet commented Sep 10, 2018

@undu I figured later. I normally don't do python, just wanted to be helpful.

@buffet
Copy link
Contributor

buffet commented Sep 10, 2018

Would fix #2

@iyzg
Copy link
Owner

iyzg commented Sep 10, 2018

Hey @undu! Thanks so much for contributing, and this is actually awesome! Could you fix the conflicts and then I'l merge it into master. Hopefully I fix the structure soon and you can just merge to the develop branch next time. Have a good day!

@undu
Copy link
Contributor Author

undu commented Sep 10, 2018

I took the liberty to fix a colon and using a function that doesn't exist in the code, you might want to run pylint or any other linter that tells you about these kinds of mistakes before committing them ;)

@iyzg
Copy link
Owner

iyzg commented Sep 10, 2018

OMG... I'm so sorry 😭 Didn't realize my linter was off. Thanks so much man!

@iyzg iyzg merged commit 8160a88 into iyzg:master Sep 10, 2018
@iyzg
Copy link
Owner

iyzg commented Sep 10, 2018

@undu Hey.... so how are users supposed to use pip to install this? I've personally never used pip before in a project xD

@buffet buffet mentioned this pull request Sep 11, 2018
@undu
Copy link
Contributor Author

undu commented Sep 11, 2018

List of valid classifier values: https://pypi.org/pypi?%3Aaction=list_classifiers

  • Second uploading to pypi using twine:
    twine upload dist/*

You can check instructions in the twine link to upload to the test pypi before making the actual upload.

  • Then the user can install it with pip: pip install sequestrum

Alternatively people can download the source, create the package from the first step and install it from the package (wheel):
pip install <sequestrum-version>.whl

PS: The version of the package generated is taken from the git tag; I recommend to publish only packages taken from tagged commits, otherwise they'll contain the hash of the git commit they're based in.

@undu undu deleted the package branch September 11, 2018 08:20
@buffet
Copy link
Contributor

buffet commented Sep 11, 2018

@undu He's already working on switching to a Git Flow workflow, which would allow to work with tagged releases on the master branch.

@iyzg
Copy link
Owner

iyzg commented Sep 11, 2018

Alright thanks so I should only push to GitHub and upload to pip the releases that have a tag? I'll upload to pip tonight after making a tagged release just so I can put it on there. Much thanks c:

@undu
Copy link
Contributor Author

undu commented Sep 12, 2018

The release process would be:

  • Prepare readmes, changelogs, etc
  • Tag the commit in git (also upload it to github)
  • Make the package from the tagged commit & upload

@iyzg
Copy link
Owner

iyzg commented Sep 12, 2018

Thanks so much!

@iyzg
Copy link
Owner

iyzg commented Sep 16, 2018

Hey @undu I've been trying to upload a new version but it's giving me

HTTPError: 400 Client Error: File already exists. See https://pypi.org/help/#file-name-reuse for url: https://upload.pypi.org/legacy/

I've been doing

  1. git add .
  2. git commit -m "Some Message
  3. git tag <tagname>
  4. git push origin <tagname>

Then i've been doing the steps you said up there, but it isn't uploading. If you could help that'd be awesome. Thanks c:

@iyzg
Copy link
Owner

iyzg commented Sep 17, 2018

twine upload -r pypi dist/sequestrum-<version_number>*
python setup.py sdist bdist_wheel

Find version number in dict
This is what I had to do to fix it and have it uplaod the correct file.

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

Successfully merging this pull request may close these issues.

None yet

3 participants