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

Use Python distutils for installation #84

Closed
chiggs opened this issue Dec 27, 2015 · 4 comments
Closed

Use Python distutils for installation #84

chiggs opened this issue Dec 27, 2015 · 4 comments

Comments

@chiggs
Copy link
Contributor

chiggs commented Dec 27, 2015

The module installation is a little overkill and unfriendly to Python users. Since there is nothing exotic that needs building, I suggest migrating to the standard python setup.py installation script.

This would then enable the project to be placed on PyPi and users could then install using the typical Python mechanism: pip install fusesoc.

chiggs added a commit to chiggs/fusesoc that referenced this issue Dec 27, 2015
@olofk
Copy link
Owner

olofk commented Dec 27, 2015

The original plan was to use distutils, distribute, setuptools, pip, easy_install, waf, scons... whatever it's called, but Python packaging looked like a mess to me, so I decided that it was way easier to use autotools instead. One thing that I couldn't figure out was how to install the package to some user-writable location. It seemed like it forced installation to /usr/lib/.... I'm not sure I'm convinced by the greatness of pip/pypi either when at least all Linux distributions already have package managers.

With that said, I'll happly accept patches however to make it work in a more python-friendly way. I would however prefer to have the automake system still around side-by-side with distutils, at least until the next released version

@olofk
Copy link
Owner

olofk commented Dec 27, 2015

I tried the patch now and installing works fine. There are some things that I can't figure out how to do however.

  1. I can't see any way to uninstall
  2. I'm having problems installing to a custom directory. (Not sure I need this though. Can as well run from the source directory)
  3. Can't figure out how to handle dependencies. Right now there's a hard dep on git and some other basic tools. Also, svn is an optional dependency. (In worst case these could be handled at runtime with exceptions, but having proper install-time dependencies makes it easier for package maintainers)

@chiggs
Copy link
Contributor Author

chiggs commented Dec 27, 2015

Agreed, Python packaging is a total mess. Sadly, it's probably never going to get sorted out. Question is whether to try and fit in with the mess or not - I think it will be easier for users ultimately if fusesoc behaves like other Python packages. Keeping automake in parallel with distutils sounds like a very sensible compromise.

I can't see any way to uninstall

This is a general problem with Python packaging. In theory pip uninstall fusesoc should work though I haven't tested it.

I'm having problems installing to a custom directory. (Not sure I need this though. Can as well run from the source directory)

pip install --install-option="--prefix=/some/user/location" .

Can't figure out how to handle dependencies.

Apparently the standard mechanism is to check in setup.py and raise an exception with a helpful error message. This doesn't help package maintainers though and is a slightly cruddy way of doing things.

@olofk
Copy link
Owner

olofk commented Dec 27, 2015

Fair enough. I see the benefits of being on pypi and keeping up with what the rest of the Python world is doing. I simplified the autotools files a bit to make it easier to co-exist with distutils. If you rebase your patches, just add setup.{cfg,py} and change version to 1.4-dev (or whatever distutils uses to indicate that this is a development version that will end up as 1.4 in time) I'm happy to add this

chiggs added a commit to chiggs/fusesoc that referenced this issue Dec 29, 2015
chiggs added a commit to chiggs/fusesoc that referenced this issue Dec 29, 2015
chiggs added a commit to chiggs/fusesoc that referenced this issue Dec 29, 2015
@olofk olofk closed this as completed in 8a901e3 Jan 4, 2016
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

2 participants