Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-28 Thread Christoph Berg
Re: Timo Röhling
> https://lists.debian.org/debian-devel/2023/07/msg00307.html

Thanks for the explanation, I'm preparing an upload.

Cheers,
Christoph



Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-28 Thread Timo Röhling

Hi Christoph,

* Christoph Berg  [2023-07-28 10:26]:

did cmake intentionally change Python_SITELIB to point to /usr/local?

No, that is a side effect of migrating from the deprecated
distutils.sysconfig module to the sysconfig module. From the Python
side, the behavior is actually desirable, though. I posted an
explanation on debian-devel yesterday:

https://lists.debian.org/debian-devel/2023/07/msg00307.html


Cheers
Timo

--
⢀⣴⠾⠻⢶⣦⠀   ╭╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling   │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄   ╰╯


signature.asc
Description: PGP signature


Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-28 Thread Christoph Berg
Hi Timo,

did cmake intentionally change Python_SITELIB to point to /usr/local?

Re: Gregor Riepl
> > purelib: directory for site-specific, non-platform-specific files
> > (https://docs.python.org/3/library/sysconfig.html)
> > 
> > "site-specific" doesn't sound like packages should install anything
> > there.
> 
> "site-specific" may be meant from the perspective of the Python interpreter,
> not the whole system, so it does sound correct to me - especially if you
> consider that Python modules are separated into the standard library and
> dist-packages.
> 
> > Perhaps the bug is that Python_SITELIB is used and it should be
> > something else?
> 
> I've tried Python_STDLIB (=sysconfig.get_path('stdlib')), but that's
> definitely wrong: It points to /usr/lib/python3.11
> 
> Python packages are normally installed into /usr/lib/python3/dist-packages/
> (or /usr/lib/python3.11/dist-packages/ if they're interpreter-specific).
> Uranium used to be installed into /usr/lib/python3/dist-packages/, because
> it's a pure Python library and doesn't depend on the interpreter version.
> 
> Python_STDARCH and Python_SITEARCH have the same values as Python_STDLIB and
> Python_SITELIB, and I don't see any other useful FindPython[1] variables.
> IMHO, Python_SITELIB is still the best choice, unless there's some other way
> to install Python modules in cmake that doesn't involve these variables.
> 
> I'm going to ask the debian-python list for help, perhaps they know more
> about the correct paths to use.
> In the meantime, I do think this issue should block cmake 3.27 migration
> until we've sorted it out, so the bug should be reassigned to cmake.
> 
> 
> [1] https://cmake.org/cmake/help/latest/module/FindPython.html
> 

Christoph



Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-28 Thread Gregor Riepl

purelib: directory for site-specific, non-platform-specific files
(https://docs.python.org/3/library/sysconfig.html)

"site-specific" doesn't sound like packages should install anything
there.


"site-specific" may be meant from the perspective of the Python 
interpreter, not the whole system, so it does sound correct to me - 
especially if you consider that Python modules are separated into the 
standard library and dist-packages.


> Perhaps the bug is that Python_SITELIB is used and it should be
> something else?

I've tried Python_STDLIB (=sysconfig.get_path('stdlib')), but that's 
definitely wrong: It points to /usr/lib/python3.11


Python packages are normally installed into 
/usr/lib/python3/dist-packages/ (or /usr/lib/python3.11/dist-packages/ 
if they're interpreter-specific). Uranium used to be installed into 
/usr/lib/python3/dist-packages/, because it's a pure Python library and 
doesn't depend on the interpreter version.


Python_STDARCH and Python_SITEARCH have the same values as Python_STDLIB 
and Python_SITELIB, and I don't see any other useful FindPython[1] 
variables.
IMHO, Python_SITELIB is still the best choice, unless there's some other 
way to install Python modules in cmake that doesn't involve these variables.


I'm going to ask the debian-python list for help, perhaps they know more 
about the correct paths to use.
In the meantime, I do think this issue should block cmake 3.27 migration 
until we've sorted it out, so the bug should be reassigned to cmake.



[1] https://cmake.org/cmake/help/latest/module/FindPython.html



Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-27 Thread Christoph Berg
Re: Gregor Riepl
> This is caused by a change in cmake 3.27.
> 
> In 3.26.4-4, Python_SITELIB is /usr/lib/python3/dist-packages.
> In 3.27.1-1, it's /usr/local/lib/python3.11/dist-packages
> 
> The documentation for 3.26 states:
> > Information returned by 
> > distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False) 
> > or else sysconfig.get_path('purelib').
> 
> And for 3.27:
> > Information returned by sysconfig.get_path('purelib').
> 
> I'm not sure if Debian overrides this in any way, but it's certainly a 
> regression.

purelib: directory for site-specific, non-platform-specific files
(https://docs.python.org/3/library/sysconfig.html)

"site-specific" doesn't sound like packages should install anything
there.

Perhaps the bug is that Python_SITELIB is used and it should be
something else?

Christoph



Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-27 Thread Christoph Berg
Re: Gregor Riepl
> 
> > > -- Installing: 
> > > /<>/debian/tmp/usr/local/lib/python3.11/dist-packages/UM
> > > -- Installing: 
> > > /<>/debian/tmp/usr/local/lib/python3.11/dist-packages/UM/ColorImage.py
> 
> > > dh_install: warning: Cannot find (any matches for) 
> > > "usr/lib/python3/dist-packages/UM" (tried in ., debian/tmp)
> > > 
> > > dh_install: warning: python3-uranium missing files: 
> > > usr/lib/python3/dist-packages/UM
> > > dh_install: error: missing files, aborting
> > > make: *** [debian/rules:7: binary] Error 25
> 
> Those are very strange results.
> No files should end up in /usr/local!
> 
> And I haven't been able to reproduce this locally yet.
> Investigation ongoing...

I can reproduce it here, but haven't investigated yet.

Christoph



Bug#1042157: [3dprinter-general] Bug#1042157: uranium: FTBFS: dh_install: error: missing files, aborting

2023-07-26 Thread Gregor Riepl




-- Installing: 
/<>/debian/tmp/usr/local/lib/python3.11/dist-packages/UM
-- Installing: 
/<>/debian/tmp/usr/local/lib/python3.11/dist-packages/UM/ColorImage.py



dh_install: warning: Cannot find (any matches for) 
"usr/lib/python3/dist-packages/UM" (tried in ., debian/tmp)

dh_install: warning: python3-uranium missing files: 
usr/lib/python3/dist-packages/UM
dh_install: error: missing files, aborting
make: *** [debian/rules:7: binary] Error 25


Those are very strange results.
No files should end up in /usr/local!

And I haven't been able to reproduce this locally yet.
Investigation ongoing...