Opened 12 years ago
Closed 12 years ago
#36223 closed defect (fixed)
xraylib: needs to enforce use of MacPorts python
Reported by: | watsodw | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | Tom.Schoonjans@… | |
Port: | xraylib |
Description
Updated xraylib to 2.16.0_0 and got this warning:
Warning: violation by /Library/Python Warning: xraylib violates the layout of the ports-filesystems! Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!
Running Snow Leopard 10.6.8
Attachments (1)
Change History (12)
comment:1 follow-up: 2 Changed 12 years ago by Tom.Schoonjans@…
comment:2 follow-ups: 4 7 Changed 12 years ago by watsodw
Replying to Tom.Schoonjans@…:
Hello David,
I've added an option to xraylib that allows the python bindings to be installed within the native site-packages folder of the selected python-interpreter, in order to avoid having to use the PYTHONPATH environment variable. This option is activated in the port file and therefore leads to your warning since you appear to be using the python interpreter that came with Mac OS X.
I will add the destroot.violate_mtree setting to the port file which should take care of this warning.
Cheers,
Tom
Actually, if I do "which python" I get:
/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/bin/python
so I don't know why its looking at /Library/Python
Dave
comment:3 follow-up: 5 Changed 12 years ago by mf2k (Frank Schima)
@Tom: The current python variant is insufficient as it stands. Macports policy is not to rely on the currently selected python. It would be much better to have pythonXY variants instead which work with macports python versions. See the root port, among many others, as an example.
comment:4 follow-up: 6 Changed 12 years ago by Tom.Schoonjans@…
Replying to david.w.watson@…:
Replying to Tom.Schoonjans@…:
Hello David,
I've added an option to xraylib that allows the python bindings to be installed within the native site-packages folder of the selected python-interpreter, in order to avoid having to use the PYTHONPATH environment variable. This option is activated in the port file and therefore leads to your warning since you appear to be using the python interpreter that came with Mac OS X.
I will add the destroot.violate_mtree setting to the port file which should take care of this warning.
Cheers,
Tom
Actually, if I do "which python" I get:
/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/bin/python
so I don't know why its looking at /Library/Python
Dave
That's unexpected... I cannot reproduce that behavior on Mountain Lion. Unfortunately I do not have access to Snow Leopard.
Would it be possible to compile xraylib yourself and send me the config.log file? Make sure to use the --enable-python-integration option to configure.
I would be very grateful!
Best,
Tom
comment:5 Changed 12 years ago by Tom.Schoonjans@…
Replying to macsforever2000@…:
@Tom: The current python variant is insufficient as it stands. Macports policy is not to rely on the currently selected python. It would be much better to have pythonXY variants instead which work with macports python versions. See the root port, among many others, as an example.
Ok, I'll start working on this. Thanks for the example, it looks quite useful.
Best,
Tom
Changed 12 years ago by watsodw
Attachment: | config.log added |
---|
comment:6 follow-up: 9 Changed 12 years ago by watsodw
Replying to Tom.Schoonjans@…:
Replying to david.w.watson@…:
Replying to Tom.Schoonjans@…:
Hello David,
I've added an option to xraylib that allows the python bindings to be installed within the native site-packages folder of the selected python-interpreter, in order to avoid having to use the PYTHONPATH environment variable. This option is activated in the port file and therefore leads to your warning since you appear to be using the python interpreter that came with Mac OS X.
I will add the destroot.violate_mtree setting to the port file which should take care of this warning.
Cheers,
Tom
Actually, if I do "which python" I get:
/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/bin/python
so I don't know why its looking at /Library/Python
Dave
That's unexpected... I cannot reproduce that behavior on Mountain Lion. Unfortunately I do not have access to Snow Leopard.
Would it be possible to compile xraylib yourself and send me the config.log file? Make sure to use the --enable-python-integration option to configure.
I would be very grateful!
Best,
Tom
Attached is config.log. The package failed to build, though, with a
Making all in java swig -I../include -includeall -java -o xraylib_wrap.c ../src/xraylib.i :3: Error: Unable to find 'java.swg' ../src/xraylib.i:15: Error: Unable to find 'typemaps.i'
error. But that's not relevant at this point.
comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to david.w.watson@…:
Actually, if I do "which python" I get:
/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/bin/python
so I don't know why its looking at /Library/Python
You must have manually added /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/bin to your $PATH. Doesn't matter; MacPorts doesn't use your $PATH.
comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | Strange warning staging xraylib into destroot → xraylib: needs to enforce use of MacPorts python |
---|
comment:9 Changed 12 years ago by Tom.Schoonjans@…
Replying to david.w.watson@…:
Replying to Tom.Schoonjans@…:
Replying to david.w.watson@…:
Replying to Tom.Schoonjans@…:
Hello David,
I've added an option to xraylib that allows the python bindings to be installed within the native site-packages folder of the selected python-interpreter, in order to avoid having to use the PYTHONPATH environment variable. This option is activated in the port file and therefore leads to your warning since you appear to be using the python interpreter that came with Mac OS X.
I will add the destroot.violate_mtree setting to the port file which should take care of this warning.
Cheers,
Tom
Actually, if I do "which python" I get:
/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/bin/python
so I don't know why its looking at /Library/Python
Dave
That's unexpected... I cannot reproduce that behavior on Mountain Lion. Unfortunately I do not have access to Snow Leopard.
Would it be possible to compile xraylib yourself and send me the config.log file? Make sure to use the --enable-python-integration option to configure.
I would be very grateful!
Best,
Tom
Attached is config.log. The package failed to build, though, with a
Making all in java swig -I../include -includeall -java -o xraylib_wrap.c ../src/xraylib.i :3: Error: Unable to find 'java.swg' ../src/xraylib.i:15: Error: Unable to find 'typemaps.i'error. But that's not relevant at this point.
Based on your config.log it looks definitely due to your PATH variable as pointed out by Ryan already. In fact, if you would have installed xraylib this way it would not have put the python bindings in /Library/Python but in the correct folder of macport's python...
comment:10 Changed 12 years ago by Tom.Schoonjans@…
Hello again,
The patches I submitted in #36220 now include support for different python versions.
Thanks,
Tom
Hello David,
I've added an option to xraylib that allows the python bindings to be installed within the native site-packages folder of the selected python-interpreter, in order to avoid having to use the PYTHONPATH environment variable. This option is activated in the port file and therefore leads to your warning since you appear to be using the python interpreter that came with Mac OS X.
I will add the destroot.violate_mtree setting to the port file which should take care of this warning.
Cheers,
Tom