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 plasma pip-installable #60

Open
lvh opened this issue May 8, 2016 · 9 comments
Open

Make plasma pip-installable #60

lvh opened this issue May 8, 2016 · 9 comments

Comments

@lvh
Copy link

lvh commented May 8, 2016

Making this pip-installabe would make it more accessible to a bunch of folks. It would also be great if there were Windows, OS X and maybe even manylinux binary wheels (although I appreciate that these are less important than they are for other projects, since if you care about disassembly you probably have a C compiler lying around).

(As a side note, thanks for doing this, this looks amazing)

@lvh
Copy link
Author

lvh commented May 8, 2016

This has a few consequences:

  • setup.py just uses setuptools all the time; you can still use distutils but it'll end up being a lie anyway. If you have prior experience with setuptools: I promise it's OK now :D
  • the sudo pip install in requirements.sh is probably a bad idea on most systems, but can be replaced by much less code/declarative configuration

@lvh
Copy link
Author

lvh commented May 8, 2016

The requirements.sh file claims pefile isn't installable, and therefore does a manual thing with future/pefile cloning, but this appears resolved:

lvh@zygalski ~/P/plasma (master)> pip install pefile                                                                                                                                                                       08:21:32
Collecting pefile
  Downloading pefile-2016.3.28.tar.gz (58kB)
    100% |████████████████████████████████| 61kB 1.3MB/s
Collecting future (from pefile)
  Downloading future-0.15.2.tar.gz (1.6MB)
    100% |████████████████████████████████| 1.6MB 917kB/s
Installing collected packages: future, pefile
  Running setup.py install for future ... done
  Running setup.py install for pefile ... done
Successfully installed future-0.15.2 pefile-2016.3.28

@lvh
Copy link
Author

lvh commented May 8, 2016

requirement.sh specifies a specific capstone version, but you can also specify capstone==3.0.4 in setup.py/requirements.txt.

@lvh
Copy link
Author

lvh commented May 8, 2016

I don't know to what extent you're familiar with modern Python packaging, but https://python-packaging-user-guide.readthedocs.io/en/latest/ is an excellent starter. I'm also happy to help with any questions you may have.

@lvh
Copy link
Author

lvh commented May 8, 2016

elftools can be installed as pip install pyelftools. This appears to have been an issue before: #38

@ghost
Copy link

ghost commented May 8, 2016

Thank you for your comments. In fact I'm not very familiar with pip and packaging. The setup file was created at the origin by another author 266a49e.

I have updated the requirements.sh for pefile. But for pyelftools I already do the pip install, no ?

You are walcome if you have any improvements ;)

@lvh
Copy link
Author

lvh commented May 9, 2016

You do sudo -H pip install which is a bad idea in many environments. The main point is that requirements should be specified in setup.py as per https://python-packaging-user-guide.readthedocs.io/en/latest/distributing/#initial-files . This will also help you upload your package to PyPI, meaning that people will just be able to pip install plasma to get plasma working.

@lvh
Copy link
Author

lvh commented May 9, 2016

(This also makes it much easier for distributions to package your software.)

@ghost
Copy link

ghost commented May 21, 2016

I have a bit simplified the installation process 1626f5c

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

1 participant