[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: building python debian packages and virtualenv



Brian May <brian@microcomaustralia.com.au> writes:

> Several times I have made the mistake of building a Debian package
> while a virtualenv is active. This results in the paths being
> incorrect in the Debian package.

The best way to avoid this is to always use a build tool which builds
the package in its *own* environment, separate from what you're doing
for your interactive session. ‘pbuilder(1)’ and ‘sbuild(1)’ are good for
this.

> Fortunately, so far I have always noticed this before uploading the
> package, however think it is only a matter of time before I stuff up
> an upload.

Right. Now is the time to make a session-based build tool a non-optional
part of your package maintenance :-)

> Just wondering if it would be considered appropriate to have, say,
> dh_auto_build fail if it is about to call setup.py and it is inside a
> virtualenv.

Possibly; I don't have enough expertise on that to say whether it's a
good idea.

-- 
 \      “Be careless in your dress if you must, but keep a tidy soul.” |
  `\                              —Mark Twain, _Following the Equator_ |
_o__)                                                                  |
Ben Finney


Reply to: