.py files install to dist-packages not site-packages

Bug #790883 reported by Bruno Postle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
High
Unassigned

Bug Description

[Just working on the 2011.1.0 fedora rpm package]

I'm no python expert so correct me if I'm wrong, the Hugin .py, .pyc & .pyo files install to here:

   $LIBDIR/python2.7/dist-packages

...whereas the fedora documentation suggests they would go into:

   $LIBDIR/python2.7/site-packages

In particular they say that python libs should go in whatever location you get when you run this command:

  python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"

Which here is /usr/lib64/python2.7/site-packages

Revision history for this message
Yuv (yuv) wrote :

I am no expert either, but the logical place where I would put Hugin Python scripts is:
* /usr/local/bin/ (or /usr/bin) for HSI scripts, i.e. those that are meant to be CLI commands or stand-alone GUI tools that simply use Hugin functionality.
* /usr/local/share/hugin/plugins (or /usr/share/hugin/plugins) for HPI scripts, i.e. those that only make sense when run as plugins from within Hugin. The plugins directory is to be created new.

The above is for "system-wide" distributed scripts and plugins that will be part of core Hugin.

Beyond that, the user can write their own scripts anywhere they can put executables with 'import hsi'; and we should make provision for a standard location in the user's own folder for his self-written plug-ins.

I am not sure that it makes sense to install .pyc and .pyo - IIRC these are generated automatically the first time the .py is executed.

We will also need equivalent locations for Windows and OSX.

Changed in hugin:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Bruno Postle (brunopostle) wrote :

These are not scripts, this is the Hugin python interface itself. This is a python library, so it make sense to install into $LIBDIR just like any other reusable python code that should be available system-wide.

The .pyc and .pyo files need to be built and installed, unless you are running Hugin as root they will not be generated at runtime.

Revision history for this message
Yuv (yuv) wrote :

Sorry for misunderstanding the report. Now I understand. The path was sort of a mix of hard-coded / generated for Ubuntu.

Tried to fix in changeset 5285:868a9b2d0977

Please test. Here on Ubuntu it makes no difference because the location is the correct one.

Changed in hugin:
status: Confirmed → In Progress
Revision history for this message
Bruno Postle (brunopostle) wrote :

Thanks, seems to be ok here. At least the files now get installed into /usr/lib64/python2.7/site-packages on fedora.

Yuv (yuv)
Changed in hugin:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.