AMICI icon indicating copy to clipboard operation
AMICI copied to clipboard

Python package installation from python/sdist/ broken

Open dweindl opened this issue 5 years ago • 6 comments

Only the development installation with pip -e or via sdist works. This is due to the symlink to README.md. Needs to be cleaned up somehow.

dweindl avatar Jun 26 '19 13:06 dweindl

Without this being addressed, Python package installations from the github repository won't work for Windows users. (Does not affect installation of source distributions created elsewhere.)

dweindl avatar Sep 26 '19 14:09 dweindl

Fixing this also for Windows users is a bit tricky. Problem is that Python setuptools expects the same directory structure in the repository as we want to have in the installation directory. This is no problem for Python-only projects, but causes trouble here if we want to separate the different interfaces. Same problem with the current implementation of enscons.

Options:

  1. keeping things as they are (symlinks to create required python package structure)
  • ++ separation of interfaces
  • ++ supports editable installation
  • -- won't work for windows (EDIT: Just noticed that Windows can meanwhile handle symlinks, so this option looks most attractive)
  1. creating the required directory structure from cmake in a temporary directory
  • ++ separation of interfaces
  • ++ works for windows
  • -- requires cmake (minor)
  • -- breaks editable pip installation
  1. rearrange directory structure for setuptools
  • ++ works on windows
  • ++ supports editable installation
  • -- is a big mess, no separation of interfaces
  1. modifying setuptools or enscons behaviour to allow specifying destination of files in package
  • -- lot's of work
  • -- breaks editable pip installation

Any ideas who to handle that in a nicer way?

dweindl avatar Sep 29 '19 08:09 dweindl

What do you precisely mean by "separation of interfaces"?

paulstapor avatar Sep 29 '19 09:09 paulstapor

What do you precisely mean by "separation of interfaces"?

Keeping the C++/Matlab/Python/.. files in separate folders instead of pressing everything in a shape working for Python setuptools.

dweindl avatar Sep 29 '19 12:09 dweindl

Update: The problem is not only the readme symlink which would be easy to fix, but it applies to many other files, especially everything below ThirdParty/.

This is intended behavior of pip. So "wontfix". The way to go is via sdist.

dweindl avatar Jan 30 '20 21:01 dweindl

Actually cd python/sdist && python setup.py install works, only cd python/sdist && pip install . fails.

dweindl avatar Jul 05 '21 09:07 dweindl