Re: Python / Debian package dependencies
On 21 Nov, 23:09, Steven Samuel Cole [EMAIL PROTECTED] wrote: 1. I must use a 'higher-level' tool than dpkg to install the package which automatically resolves and installs dependency packages. There has got to be a way to use apt-get for .deb files which do not reside (yet) in a repository. I more or less skipped the part about installation, but had the dependencies been included correctly in the package description and had they not been available, dpkg would have complained. You can use apt-get with local repositories, although the magic required for initialising them isn't too obvious. That said, if it's like the package building scene, I'm sure various tools exist for initialising repositories; I use a very short shell script to run the programs that update the repository records. 2. stdeb does not seem to 'transform' dependencies specified in setup.py into dependencies in its output files. There seems to be a mailing list for stedb athttp://mail.python.org/mailman/listinfo/distutils-sig. I'll try there. Good luck! One of the issues with such transformations is that they cannot generally be done trivially, but perhaps some kind of mapping between upstream source packages and Debian packages would alleviate such difficulties. Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: Python / Debian package dependencies
I'm not familiar with stdeb, but dpkg-buildpackage needs a file called control. This is this file that will be used to generate deb archive with the good dependancies. Into this file, there are two fields, Build-Depends and Depends, that give to dpkg-buildpackage what are the package dependancies. Check this control file content, you should have psycopg2 and setuptools (if it is really a dependancy) in the Depends field. If it not the case, do it manually. Do not forget to check and notify the version of this dependancies. Regards. Stephane 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED] Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED]: Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Python / Debian package dependencies
That's exactly the piece of information I needed! :-) The control file created by setdeb (stdeb_run_setup, to be precise) looks like this (some lines will get wrapped): Source: my package name Maintainer: my name my email address Section: python Priority: optional Build-Depends: python-setuptools (= 0.6b3-1), python-all-dev (= 2.3.5-11), debhelper (= 5.0.38), python-central (= 0.5.6) Standards-Version: 3.7.2 XS-Python-Version: all Package: python-my package name Architecture: all Depends: ${python:Depends} Recommends: Suggests: XB-Python-Version: ${python:Versions} Provides: ${python:Provides} Description: my description So apparently, stdeb adds setuptools by itself already, but it does not add the dependency packages I specified in setup.py. When I now append python-psycopg2 (= 2.0.6-3) to the Depends: copy the .deb file to the virtual machine and run sudo dpkg -i python-my package name-all.deb, I get the following output: Selecting previously deselected package python-my package name. (Reading database ... 17508 files and directories currently installed.) Unpacking python-my package name (from python-my package name_0.0.1-4927-1_all.deb) ... dpkg: dependency problems prevent configuration of python-inro-marvin-setup: python-my package name depends on python-psycopg2 (= 2.0.6-3); however: Package python-psycopg2 is not installed. dpkg: error processing python-my package name (--install): dependency problems - leaving unconfigured Errors were encountered while processing: python-my package name My conclusions: 1. I must use a 'higher-level' tool than dpkg to install the package which automatically resolves and installs dependency packages. There has got to be a way to use apt-get for .deb files which do not reside (yet) in a repository. 2. stdeb does not seem to 'transform' dependencies specified in setup.py into dependencies in its output files. There seems to be a mailing list for stedb at http://mail.python.org/mailman/listinfo/distutils-sig. I'll try there. Thanks for your help! Cheers, Steve Stephane Bulot schrieb: I'm not familiar with stdeb, but dpkg-buildpackage needs a file called control. This is this file that will be used to generate deb archive with the good dependancies. Into this file, there are two fields, Build-Depends and Depends, that give to dpkg-buildpackage what are the package dependancies. Check this control file content, you should have psycopg2 and setuptools (if it is really a dependancy) in the Depends field. If it not the case, do it manually. Do not forget to check and notify the version of this dependancies. Regards. Stephane 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that
Re: Python / Debian package dependencies
Steven, apt-get uses /etc/apt/sources.list file to know where packages must be downloaded from. Usually from a http repository. But, you can use a file destination: deb file:/path/to/file unstable main contrib non-free I advise you to read the debian maintainer guide and the apt-get and sources.list man. Regards. Stephane 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED] That's exactly the piece of information I needed! :-) The control file created by setdeb (stdeb_run_setup, to be precise) looks like this (some lines will get wrapped): Source: my package name Maintainer: my name my email address Section: python Priority: optional Build-Depends: python-setuptools (= 0.6b3-1), python-all-dev (= 2.3.5-11), debhelper (= 5.0.38), python-central (= 0.5.6) Standards-Version: 3.7.2 XS-Python-Version: all Package: python-my package name Architecture: all Depends: ${python:Depends} Recommends: Suggests: XB-Python-Version: ${python:Versions} Provides: ${python:Provides} Description: my description So apparently, stdeb adds setuptools by itself already, but it does not add the dependency packages I specified in setup.py. When I now append python-psycopg2 (= 2.0.6-3) to the Depends: copy the .deb file to the virtual machine and run sudo dpkg -i python-my package name-all.deb, I get the following output: Selecting previously deselected package python-my package name. (Reading database ... 17508 files and directories currently installed.) Unpacking python-my package name (from python-my package name_0.0.1-4927-1_all.deb) ... dpkg: dependency problems prevent configuration of python-inro-marvin-setup: python-my package name depends on python-psycopg2 (= 2.0.6-3); however: Package python-psycopg2 is not installed. dpkg: error processing python-my package name (--install): dependency problems - leaving unconfigured Errors were encountered while processing: python-my package name My conclusions: 1. I must use a 'higher-level' tool than dpkg to install the package which automatically resolves and installs dependency packages. There has got to be a way to use apt-get for .deb files which do not reside (yet) in a repository. 2. stdeb does not seem to 'transform' dependencies specified in setup.py into dependencies in its output files. There seems to be a mailing list for stedb at http://mail.python.org/mailman/listinfo/distutils-sig. I'll try there. Thanks for your help! Cheers, Steve Stephane Bulot schrieb: I'm not familiar with stdeb, but dpkg-buildpackage needs a file called control. This is this file that will be used to generate deb archive with the good dependancies. Into this file, there are two fields, Build-Depends and Depends, that give to dpkg-buildpackage what are the package dependancies. Check this control file content, you should have psycopg2 and setuptools (if it is really a dependancy) in the Depends field. If it not the case, do it manually. Do not forget to check and notify the version of this dependancies. Regards. Stephane 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] : Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism
Re: Python / Debian package dependencies
Hi Steven, This is a normal behaviour for dpkg. If there is a failing dependancy, dpkg will not install dependancies, it will notify only and will not install the package. Dependancies installations are managed by the front-end to dpkg (aptitude or apt). This is not a python issue that you are facing to. Cheers Stephbul 2008/11/20 Steven Samuel Cole [EMAIL PROTECTED] Hi all, I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual machine I use to test the package. The problem is that my modules require the psycopg2 python package and the entry point seems to require setuptools. I can't figure out how to declare a dependency that actually results in the dependency Debian packages being installed. I tried adding these lines to setup.py: requires = ['psycopg2', 'setuptools'], requires = ['psycopg2 (=0.1)', 'setuptools (=0.1)'], install_requires = ['psycopg2', 'setuptools'], install_requires = ['psycopg2=0.1', 'setuptools=0.1'], and then run stdeb_run_setup and dpkg-buildpackage -rfakeroot -uc -us in the deb_dist/package name folder created, but when I copy the .deb file over to the virtual machine and do dpkg -i .deb file, none of them would actually install psycopg2 and setuptools. What am I doing wrong ? Am I actually somewhat on the right track or am I doing complete nonsense ? Thanks for your help! Cheers, Steve -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Python / Debian package dependencies
On 20 Nov, 02:14, Steven Samuel Cole [EMAIL PROTECTED] wrote: I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual machine I use to test the package. The problem is that my modules require the psycopg2 python package and the entry point seems to require setuptools. Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. I can't figure out how to declare a dependency that actually results in the dependency Debian packages being installed. I tried adding these lines to setup.py: requires = ['psycopg2', 'setuptools'], requires = ['psycopg2 (=0.1)', 'setuptools (=0.1)'], install_requires = ['psycopg2', 'setuptools'], install_requires = ['psycopg2=0.1', 'setuptools=0.1'], How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: Python / Debian package dependencies
Hi Stephane, thanks for your reply! :-) I do not get any notification or warning or whatever from dpkg, all output I get when running # sudo dpkg -i python-package name_0.0.1-4927-1_all.deb is Selecting previously deselected package python-package name. (Reading database ... 15026 files and directories currently installed.) Unpacking python-package name (from python-package name_0.0.1-4927-1_all.deb) ... Setting up python-package name (0.0.1-4927-1) ... And my package name package itself does get installed, but the 'psycopg2' and 'setuptools' packages it depends on do not get installed... How would I install a package with apt-get if I don't have it in the repository, but only have a local .deb file ? Cheers, Steve 2008/11/20 Stephane Bulot [EMAIL PROTECTED]: Hi Steven, This is a normal behaviour for dpkg. If there is a failing dependancy, dpkg will not install dependancies, it will notify only and will not install the package. Dependancies installations are managed by the front-end to dpkg (aptitude or apt). This is not a python issue that you are facing to. Cheers Stephbul 2008/11/20 Steven Samuel Cole [EMAIL PROTECTED] Hi all, I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual machine I use to test the package. The problem is that my modules require the psycopg2 python package and the entry point seems to require setuptools. I can't figure out how to declare a dependency that actually results in the dependency Debian packages being installed. I tried adding these lines to setup.py: requires = ['psycopg2', 'setuptools'], requires = ['psycopg2 (=0.1)', 'setuptools (=0.1)'], install_requires = ['psycopg2', 'setuptools'], install_requires = ['psycopg2=0.1', 'setuptools=0.1'], and then run stdeb_run_setup and dpkg-buildpackage -rfakeroot -uc -us in the deb_dist/package name folder created, but when I copy the .deb file over to the virtual machine and do dpkg -i .deb file, none of them would actually install psycopg2 and setuptools. What am I doing wrong ? Am I actually somewhat on the right track or am I doing complete nonsense ? Thanks for your help! Cheers, Steve -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Python / Debian package dependencies
Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan 2008/11/21 Steven Samuel Cole [EMAIL PROTECTED]: Hey Paul thanks for your reply! :-) 2008/11/21 Paul Boddie [EMAIL PROTECTED]: Are you saying that psycopg2 needs setuptools for the setup.py script to work? This isn't generally the case (or wasn't), but maybe the entry point is a setuptools thing which would then demand that software's presence. Not exactly. My package requires psycopg2 to run and (from what it looks like to me) setuptools must be available in order to use its installation mechanism (setup.py, entry points, etc.) How does stdeb know which package provides psycopg2? I'm not really familiar with stdeb - I write my own packaging files - but might it be the case that you need to specify python-psycopg2 instead? I tried python-psycopg2, but that caused a ValueError in stdeb about a 'parenthesized list' -psycopg2. By trial error I found out that I seem to have to use the package name without the python- bit, because then stdeb does run without error. If the name was really the issue, I would at least expect stdeb to report an error about an unknown package or so... Cheers, Stefan -- http://mail.python.org/mailman/listinfo/python-list
Python / Debian package dependencies
Hi all, I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual machine I use to test the package. The problem is that my modules require the psycopg2 python package and the entry point seems to require setuptools. I can't figure out how to declare a dependency that actually results in the dependency Debian packages being installed. I tried adding these lines to setup.py: requires = ['psycopg2', 'setuptools'], requires = ['psycopg2 (=0.1)', 'setuptools (=0.1)'], install_requires = ['psycopg2', 'setuptools'], install_requires = ['psycopg2=0.1', 'setuptools=0.1'], and then run stdeb_run_setup and dpkg-buildpackage -rfakeroot -uc -us in the deb_dist/package name folder created, but when I copy the .deb file over to the virtual machine and do dpkg -i .deb file, none of them would actually install psycopg2 and setuptools. What am I doing wrong ? Am I actually somewhat on the right track or am I doing complete nonsense ? Thanks for your help! Cheers, Steve -- http://mail.python.org/mailman/listinfo/python-list