Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#44275 closed defect (fixed)

py-pint @0.5.1_0 compat directory not installed

Reported by: jeisch@… Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: py-pint

Description

With pint @0.5.1_0 installed, trying to import pint from python 2.7 gives the following error:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pint/context.py in <module>()
     17 import weakref
     18 
---> 19 from .compat import ChainMap
     20 from .util import ParserHelper, string_types
     21 

ImportError: No module named compat

Listing the directory does not show the compat directory:

[mac:python2.7/site-packages/pint] user% ls -al
total 568
drwxr-xr-x   18 root  wheel    612 Jun 10 15:50 .
drwxr-xr-x  177 root  wheel   6018 Jul  7 15:26 ..
-rw-r--r--    1 root  wheel   2855 Jun  3 21:47 __init__.py
-rw-r--r--    1 root  wheel   3395 Jun  7 13:55 __init__.pyc
-rw-r--r--    1 root  wheel   1494 Jun  3 21:47 constants_en.txt
-rw-r--r--    1 root  wheel   7994 Jun  3 21:47 context.py
-rw-r--r--    1 root  wheel  11092 Jun  7 13:55 context.pyc
-rw-r--r--    1 root  wheel  10180 Jun  3 21:47 default_en.txt
-rw-r--r--    1 root  wheel   5593 Jun  3 21:47 formatting.py
-rw-r--r--    1 root  wheel   5764 Jun  7 13:55 formatting.pyc
-rw-r--r--    1 root  wheel   3139 Jun  3 21:47 measurement.py
-rw-r--r--    1 root  wheel   4195 Jun  7 13:55 measurement.pyc
-rw-r--r--    1 root  wheel  36355 Jun  3 21:47 quantity.py
-rw-r--r--    1 root  wheel  36110 Jun  7 13:55 quantity.pyc
-rw-r--r--    1 root  wheel  46978 Jun  3 21:47 unit.py
-rw-r--r--    1 root  wheel  53567 Jun  7 13:55 unit.pyc
-rw-r--r--    1 root  wheel  13383 Jun  3 21:47 util.py
-rw-r--r--    1 root  wheel  18890 Jun  7 13:55 util.pyc

reverting to @0.4.2_0 brings back the compat.py file:

[mac:python2.7/site-packages/pint] user% ls
__init__.py		context.pyc		unit.py
__init__.pyc		default_en.txt		unit.pyc
compat.py		measurement.py		util.py
compat.pyc		measurement.pyc		util.pyc
constants_en.txt	quantity.py
context.py		quantity.pyc

Note that pint switched to a folder for the compat module a while back: https://github.com/hgrecco/pint/tree/master/pint

Change History (7)

comment:1 Changed 10 years ago by g5pw (Aljaž Srebrnič)

Owner: changed from macports-tickets@… to g5pw@…
Status: newassigned

This looks like an upstream problem. I'd suggest to open an issue on their github. Feel free to link this bug report.

comment:2 Changed 10 years ago by g5pw (Aljaž Srebrnič)

Cc: g5pw@… removed

comment:3 Changed 10 years ago by mf2k (Frank Schima)

Keywords: py-pint removed

comment:4 Changed 10 years ago by jeisch@…

The correct files are certainly on github for the tagged release. I'm not really sure how I should ask them why macports isn't properly installing the files.

comment:5 Changed 10 years ago by g5pw (Aljaž Srebrnič)

Hmm... can you try uninstalling pint and executing port -s install py27-pint? It looks like the binary archive from our buildbots is broken.

comment:6 Changed 10 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: assignedclosed

As I suspected, the issue was with upstream. When setuptools are not installed, the setup script won't copy the compat directory to destdir. I filed a bug report upstream and resolved the issue in r121810 by declaring a build dependency on setuptools.

comment:7 Changed 10 years ago by jeisch@…

Thanks so much for fixing this!

Note: See TracTickets for help on using tickets.