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

Pip packaging #5

Merged
merged 22 commits into from
Jul 15, 2016
Merged

Pip packaging #5

merged 22 commits into from
Jul 15, 2016

Conversation

obilodeau
Copy link
Member

@obilodeau obilodeau commented Jul 13, 2016

Commit trail says it all.

I tested (and fixed) Win 10 x86 and it worked.

Unfortunately due to shutil.which() we are Python 3.3+ now. This shouldn't be a problem for most environments though.

I used the devel install way (see docs/). Tomorrow I'll test:

  • pip install from git
  • from within Windows
  • resolve merge problem

But meanwhile, @Svieg can you give it a review please?

Ex: ./malboxes registry win10_64_analyst add HKCU:\Software Malboxes IsAwesome String
Example:

malboxes registry win10_64_analyst add HKCU:\Software "Malboxes IsAwesome" String
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure that this isn't the same thing. The first modifies HKCU:\Sofware's Malboxes key with the value IsAwesome as a String. I'm not sure about the behaviour of the second one since we do not provide a value for the "Malboxes IsAwesome" key.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@obilodeau
Copy link
Member Author

Worked from pip git install method. Trying Windows tomorrow.


== Installation

sudo pip install git+https://github.com/GoSecure/malboxes.git@pip-packaging#egg=malboxes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried that with a machine that didn't have the dependencies ? It doesn't work for me and the traceback indicates that it cannot import appdirs (so that should be the same for all our dependencies) because __version__ is imported from __init__.py which tries to import the dependencies. I got the same from my server too. Also, if we are py3, shouldn't that be pip3 since pip defaults to pip2 in lots of distros (pip --version points to py2.7 for both of the machines I tested on) ? Official docs doesn't seem to discourage hardcoding the version so couldn't we do that ? Django does something interesting that doesn't involve hardcoding so that would be an option too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point for pip3! I use arch so pip is a symlink to pip3 but you are right about most distro being pip -> pip2.

@Svieg
Copy link
Collaborator

Svieg commented Jul 14, 2016

After I manually installed appdirs, everything worked fine so I would fix that and merge !

setup.py needed to be able to import the main mailboxes package which
pulled in all dependencies unconditionally resulting in an error if you
were missing one.

Version is now in it's own file without dependencies
On Windows settings are stored under malboxes\\malboxes and so recursive
creation was required on that platform.
@Svieg
Copy link
Collaborator

Svieg commented Jul 14, 2016

I've tried it on windows and it works on Cygwin but not on the native command prompt since it lacks the git command.

@obilodeau
Copy link
Member Author

obilodeau commented Jul 15, 2016

Tested Windows with git installed from an installer and it works in cmd.exe, added documentation and tracking upstream bugs/PR: chocolatey-community/chocolatey-packages#261 and chocolatey/choco#836.

@obilodeau obilodeau merged commit b1f2bc1 into master Jul 15, 2016
@obilodeau obilodeau deleted the pip-packaging branch January 8, 2017 21:12
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

Successfully merging this pull request may close these issues.

None yet

2 participants