Using python-central for pure-Python package (was: dpkg-gencontrol: warning: unknown substitution variable ${python:Depends})

2007-03-20 Thread Ben Finney
Raphael Hertzog <[EMAIL PROTECTED]> writes:

> On Tue, 20 Mar 2007, Josselin Mouette wrote:
> > Nope, dh_clean -k is fine. It's just that installation should
> > start after calling it, not in the build target.
>
> Installation currently happens in "install-pythonX.Y" which is
> called before the "install" target since it's a dependency. Thus
> dh_clean -k removes what's installed.

I see what you're saying now.

> Since the package is "arch: all" the python setup.py call should
> simply be placed in the install target and the targets
> install-pythonX.Y should be removed.

Part of that target is to rename the generated egg-info directory;
Setuptools creates it as 'foo-N.M-pyX.Y.egg-info', but the
python-central documentation seems to indicate this should be renamed
to 'foo.egg-info':

# install only one Egg dir (without python's version number)
mv 
debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info
 \

debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info

How can this be done properly without knowing the exact name
(including Python version) that Setuptools will create?

-- 
 \   "The most common of all follies is to believe passionately in |
  `\   the palpably not true. It is the chief occupation of mankind."  |
_o__)  -- Henry L. Mencken |
Ben Finney


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Using python-central for pure-Python package (was: dpkg-gencontrol: warning: unknown substitution variable ${python:Depends})

2007-03-20 Thread Raphael Hertzog
On Tue, 20 Mar 2007, Ben Finney wrote:
> Part of that target is to rename the generated egg-info directory;
> Setuptools creates it as 'foo-N.M-pyX.Y.egg-info', but the
> python-central documentation seems to indicate this should be renamed
> to 'foo.egg-info':
> 
> # install only one Egg dir (without python's version number)
> mv 
> debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info
>  \
> 
> debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info
> 
> How can this be done properly without knowing the exact name
> (including Python version) that Setuptools will create?

Move that to the install target as well and replace "$*" with the version
of the current python (`pyversions -dv`).

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Using python-central for pure-Python package

2007-03-20 Thread Ben Finney
Raphael Hertzog <[EMAIL PROTECTED]> writes:

> Move that to the install target as well and replace "$*" with the
> version of the current python (`pyversions -dv`).

Thanks. That works, but raises other issues I thought we'd addressed.

I'll start a new thread with my questions.

-- 
 \   "The man who is denied the opportunity of taking decisions of |
  `\  importance begins to regard as important the decisions he is |
_o__) allowed to take."  -- C. Northcote Parkinson |
Ben Finney


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Upstream Makefile, debian/rules, eggs, building and installing

2007-03-20 Thread Ben Finney
Howdy all,

Specific questions in a previous thread have led me to believe that
I'm misuderstanding how Debian is supposed to interact with Python
packages.

The package I'm working on has its own Makefile; this includes a
'build' rule (to build documentation, move executable files around,
and build the egg using Setuptools), and an 'install' rule (to install
the documentation, executables and egg).

The Python source is under a 'src/' subdirectory, and is structured to
make development and testing easier. But it contains unit tests and
other files that shouldn't be in the resulting installation, hence the
'build' step to copy out the files necessary for installation, and the
'install' step to actually install.

The package can be got using Bazaar (across a slow home ADSL link):

$ bzr branch http://vcs.whitetree.org/bzr/public/gracie/gracie.devel/

(Note that currently the 'install' rule has been omitted from the
Makefile, because I'm still figuring out how these should work
together. The questions still stand though.)

How should the Debian packaging files interact with this? Examples
I've seen for using python-central have the egg being built in the
Debian-specific debian/rules targets, but this is clearly duplication
if the upstream Makefile already builds an egg. And what about
installation -- patch the existing Makefile, or work around it?

In normal (non-Debian) usage of Setuptools, a user will generate an
egg that is specific to a Python version, and install that; this isn't
what's needed by python-central, though. But surely the answer isn't
essentially duplication of the build-an-egg step between the upstream
Makefile and debian/rules ?

These are questions that seem at a level typical for debian-mentors,
but it's all specific to Debian packaging of Python packages, so I'm
asking here.

-- 
 \ "Quote me as saying I was mis-quoted."  -- Groucho Marx |
  `\   |
_o__)  |
Ben Finney


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]