Re: C++ and Python package combined
Thanks Leo, If I interpret the build log [1] correctly, again the Python extension is build and linked with CMake, not `python setup.py install`. Also the package does some unusual trickery in assembling the setup.py file. Anyhow, thanks for the pointers. Cheers, Nico [1] https://buildd.debian.org/status/fetch.php?pkg=ros-vision-opencv&arch=amd64&ver=1.12.3%2Bds-1%2Bb2&stamp=1519637198&raw=0 On Mon, Apr 9, 2018 at 3:51 PM Leopold Palomo-Avellaneda wrote: > Nico, > > On 09/04/18 15:13, Nico Schlömer wrote: > > Thanks Leo, > > > > I've checked out ros-bond-core now and found that it's simpler than what > I > > have: The Python package is installed just like the rest of the library > > with CMake, plus there are no compiled Python extensions that would need > to > > link against the bond library. That's why d/rules can be so simple. > > Unfortunately, this doesn't help much with my problem. > > https://salsa.debian.org/science-team/ros-vision-opencv > > there's a python extension cv_bridge > > https://salsa.debian.org/science-team/ros-image-common > > Cheers, > > Leopold > > > > Cheers, > > Nico > > > > On Mon, Apr 9, 2018 at 1:18 PM Leopold Palomo-Avellaneda < > l...@alaxarxa.net> > > wrote: > > > >> On 06/04/18 16:38, Nico Schlömer wrote: > >>> Hi everyone, > >>> > >>> I would like to package a piece of software that includes both a C++ > >>> library and a Python package. When building locally from scratch, one > is > >>> supposed to > >>> > >>> * build and install the library first, > >>> (* then build and run the tests, compiling against what just has been > >>> installed,) > >>> * then build and install the Python package, compiling against what > >> just > >>> has been installed. > >>> > >>> If C++ library and Python packages came from two different sources, > >> things > >>> would be easy. It's not clear to me though how to first install one > part > >> of > >>> a source, and then another against it. Perhaps there are example > packages > >>> out there that do that already. > >>> > >>> Any hints? > >> > >> Nico, > >> > >> maybe it helps. The ROS robotics packages has a lot of examples of C++ > >> libraries > >> and Python code. They are located in salsa, for instance: > >> > >> https://salsa.debian.org/science-team/ros-bond-core > >> > >> Take one eye. Look any example of package that begins with ros- > >> > >> Best regards, > >> > >> Leopold > >> > >> > >> -- > >> -- > >> Linux User 152692 GPG: 05F4A7A949A2D9AA > >> Catalonia > >> - > >> A: Because it messes up the order in which people normally read text. > >> Q: Why is top-posting such a bad thing? > >> A: Top-posting. > >> Q: What is the most annoying thing in e-mail? > >> > > > > > -- > -- > Linux User 152692 GPG: 05F4A7A949A2D9AA > Catalonia > - > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > >
Re: C++ and Python package combined
Nico, On 09/04/18 15:13, Nico Schlömer wrote: > Thanks Leo, > > I've checked out ros-bond-core now and found that it's simpler than what I > have: The Python package is installed just like the rest of the library > with CMake, plus there are no compiled Python extensions that would need to > link against the bond library. That's why d/rules can be so simple. > Unfortunately, this doesn't help much with my problem. https://salsa.debian.org/science-team/ros-vision-opencv there's a python extension cv_bridge https://salsa.debian.org/science-team/ros-image-common Cheers, Leopold > Cheers, > Nico > > On Mon, Apr 9, 2018 at 1:18 PM Leopold Palomo-Avellaneda > wrote: > >> On 06/04/18 16:38, Nico Schlömer wrote: >>> Hi everyone, >>> >>> I would like to package a piece of software that includes both a C++ >>> library and a Python package. When building locally from scratch, one is >>> supposed to >>> >>> * build and install the library first, >>> (* then build and run the tests, compiling against what just has been >>> installed,) >>> * then build and install the Python package, compiling against what >> just >>> has been installed. >>> >>> If C++ library and Python packages came from two different sources, >> things >>> would be easy. It's not clear to me though how to first install one part >> of >>> a source, and then another against it. Perhaps there are example packages >>> out there that do that already. >>> >>> Any hints? >> >> Nico, >> >> maybe it helps. The ROS robotics packages has a lot of examples of C++ >> libraries >> and Python code. They are located in salsa, for instance: >> >> https://salsa.debian.org/science-team/ros-bond-core >> >> Take one eye. Look any example of package that begins with ros- >> >> Best regards, >> >> Leopold >> >> >> -- >> -- >> Linux User 152692 GPG: 05F4A7A949A2D9AA >> Catalonia >> - >> A: Because it messes up the order in which people normally read text. >> Q: Why is top-posting such a bad thing? >> A: Top-posting. >> Q: What is the most annoying thing in e-mail? >> > -- -- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia - A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? signature.asc Description: OpenPGP digital signature
Re: C++ and Python package combined
Thanks Leo, I've checked out ros-bond-core now and found that it's simpler than what I have: The Python package is installed just like the rest of the library with CMake, plus there are no compiled Python extensions that would need to link against the bond library. That's why d/rules can be so simple. Unfortunately, this doesn't help much with my problem. Cheers, Nico On Mon, Apr 9, 2018 at 1:18 PM Leopold Palomo-Avellaneda wrote: > On 06/04/18 16:38, Nico Schlömer wrote: > > Hi everyone, > > > > I would like to package a piece of software that includes both a C++ > > library and a Python package. When building locally from scratch, one is > > supposed to > > > > * build and install the library first, > > (* then build and run the tests, compiling against what just has been > > installed,) > > * then build and install the Python package, compiling against what > just > > has been installed. > > > > If C++ library and Python packages came from two different sources, > things > > would be easy. It's not clear to me though how to first install one part > of > > a source, and then another against it. Perhaps there are example packages > > out there that do that already. > > > > Any hints? > > Nico, > > maybe it helps. The ROS robotics packages has a lot of examples of C++ > libraries > and Python code. They are located in salsa, for instance: > > https://salsa.debian.org/science-team/ros-bond-core > > Take one eye. Look any example of package that begins with ros- > > Best regards, > > Leopold > > > -- > -- > Linux User 152692 GPG: 05F4A7A949A2D9AA > Catalonia > - > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? >
Re: C++ and Python package combined
On 06/04/18 16:38, Nico Schlömer wrote: > Hi everyone, > > I would like to package a piece of software that includes both a C++ > library and a Python package. When building locally from scratch, one is > supposed to > > * build and install the library first, > (* then build and run the tests, compiling against what just has been > installed,) > * then build and install the Python package, compiling against what just > has been installed. > > If C++ library and Python packages came from two different sources, things > would be easy. It's not clear to me though how to first install one part of > a source, and then another against it. Perhaps there are example packages > out there that do that already. > > Any hints? Nico, maybe it helps. The ROS robotics packages has a lot of examples of C++ libraries and Python code. They are located in salsa, for instance: https://salsa.debian.org/science-team/ros-bond-core Take one eye. Look any example of package that begins with ros- Best regards, Leopold -- -- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia - A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: C++ and Python package combined
On 04/07/2018 10:43 AM, Nico Schlömer wrote: >> I guess you can set PKG_CONFIG_PATH and others appropriately. > > That sounds like what I got to do. I'm just figuring out which paths I need > exactly. Can I use export in d/rules? > > Cheers, > Nico You can find more examples of d/rules and all other debian files by using https://codesearch.debian.net/
Re: C++ and Python package combined
Hi, On 18-04-07 08:43:57, Nico Schlömer wrote: > > I guess you can set PKG_CONFIG_PATH and others appropriately. > > That sounds like what I got to do. I'm just figuring out which paths I > need exactly. Can I use export in d/rules? Yes, using export in d/rules works as expected. Cheers, Georg signature.asc Description: Digital signature
Re: C++ and Python package combined
On Sat, Apr 7, 2018 at 4:43 PM, Nico Schlömer wrote: > Can I use export in d/rules? I think so yes. -- bye, pabs https://wiki.debian.org/PaulWise
Re: C++ and Python package combined
> I guess you can set PKG_CONFIG_PATH and others appropriately. That sounds like what I got to do. I'm just figuring out which paths I need exactly. Can I use export in d/rules? Cheers, Nico On Sat, Apr 7, 2018 at 10:24 AM Paul Wise wrote: > On Sat, Apr 7, 2018 at 4:04 PM, Nico Schlömer wrote: > > >> Which software is this? > > > > FEniCS/Dolfin [1]. (I'm preparing the upcoming release.) > > Has something changed to prevent the existing dh overrides from working? > > https://sources.debian.org/src/dolfin/2017.2.0.post0-3/debian/rules > > > The latter step relies on the libraries and headers already being > installed on the system. > > I guess you can set PKG_CONFIG_PATH and others appropriately. > I use these to bring ~/opt/ dirs into various paths: > > export > PKG_CONFIG_PATH=$HOME/opt/lib/pkgconfig:$HOME/opt/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} > export PATH=$HOME/opt/bin:$HOME/opt/games${PATH:+:$PATH} > export MANPATH=$HOME/opt/share/man${MANPATH:+:$MANPATH}: > export LD_LIBRARY_PATH=$HOME/opt/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} > export LIBRARY_PATH=$HOME/opt/lib${LIBRARY_PATH:+:$LIBRARY_PATH} > export CPATH=$HOME/opt/include${CPATH:+:$CPATH} > export C_INCLUDE_PATH=$HOME/opt/include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH} > export > CPLUS_INCLUDE_PATH=$HOME/opt/include${CPLUS_INCLUDE_PATH:+:$CPLUS_INCLUDE_PATH} > export > OBJC_INCLUDE_PATH=$HOME/opt/include${OBJC_INCLUDE_PATH:+:$OBJC_INCLUDE_PATH} > > -- > bye, > pabs > > https://wiki.debian.org/PaulWise > >
Re: C++ and Python package combined
On Sat, Apr 7, 2018 at 4:04 PM, Nico Schlömer wrote: >> Which software is this? > > FEniCS/Dolfin [1]. (I'm preparing the upcoming release.) Has something changed to prevent the existing dh overrides from working? https://sources.debian.org/src/dolfin/2017.2.0.post0-3/debian/rules > The latter step relies on the libraries and headers already being installed > on the system. I guess you can set PKG_CONFIG_PATH and others appropriately. I use these to bring ~/opt/ dirs into various paths: export PKG_CONFIG_PATH=$HOME/opt/lib/pkgconfig:$HOME/opt/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} export PATH=$HOME/opt/bin:$HOME/opt/games${PATH:+:$PATH} export MANPATH=$HOME/opt/share/man${MANPATH:+:$MANPATH}: export LD_LIBRARY_PATH=$HOME/opt/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LIBRARY_PATH=$HOME/opt/lib${LIBRARY_PATH:+:$LIBRARY_PATH} export CPATH=$HOME/opt/include${CPATH:+:$CPATH} export C_INCLUDE_PATH=$HOME/opt/include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH} export CPLUS_INCLUDE_PATH=$HOME/opt/include${CPLUS_INCLUDE_PATH:+:$CPLUS_INCLUDE_PATH} export OBJC_INCLUDE_PATH=$HOME/opt/include${OBJC_INCLUDE_PATH:+:$OBJC_INCLUDE_PATH} -- bye, pabs https://wiki.debian.org/PaulWise
Re: C++ and Python package combined
> Which software is this? FEniCS/Dolfin [1]. (I'm preparing the upcoming release.) > Does the upstream build system not take care of each of the steps? Like I said, upstream build instructions are: 1. Build and install the library. (Basically CMake + make install) 2. `cd python` and install the Python module (basically `python3 setup.py install`) The latter step relies on the libraries and headers already being installed on the system. Cheers, Nico [1] https://packages.debian.org/source/sid/dolfin On Sat, Apr 7, 2018 at 9:33 AM Paul Wise wrote: > On Fri, Apr 6, 2018 at 10:38 PM, Nico Schlömer wrote: > > > I would like to package a piece of software > > Which software is this? > > > Any hints? > > Does the upstream build system not take care of each of the steps? > > -- > bye, > pabs > > https://wiki.debian.org/PaulWise > >
Re: C++ and Python package combined
On Fri, Apr 6, 2018 at 10:38 PM, Nico Schlömer wrote: > I would like to package a piece of software Which software is this? > Any hints? Does the upstream build system not take care of each of the steps? -- bye, pabs https://wiki.debian.org/PaulWise