Skip to content

Commit

Permalink
Don't allow specifying sdist_dsc options to bdist_deb
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Dec 30, 2009
1 parent 496b009 commit 5a67d2e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2009-12-30 Don't allow specifying sdist_dsc options to bdist_deb

2009-12-29 The --process-dependencies option to py2dsc was dropped,
because this functionality went beyond the scope of the
py2dsc script. The functionality could be added to a new
Expand Down
13 changes: 8 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,24 +346,27 @@ commands. Second, you may provide an ``stdeb.cfg`` file.
stdeb distutils command options
```````````````````````````````

Both the sdist_dsc and bdist_deb commands take the same set of
options. These may be given as command-line options to the distutils
The sdist_dsc command takes command-line options to the distutils
command. For example::

python setup.py --command-packages=stdeb.command sdist_dsc --debian-version 0MyName1

Would create a Debian package with the Debian version set to
This creates a Debian package with the Debian version set to
"0MyName1".

These options can also be set via distutils configuration
files. (These are the ``setup.cfg`` file alongside ``setup.py`` and
the ~/.pydistutils.cfg file.) In that case, put the arguments in the
``[sdist_dsc]`` or ``[bdist_deb]`` section. For example, a project's
``~/.setup.cfg`` file might have this::
``[sdist_dsc]`` section. For example, a project's ``~/.setup.cfg``
file might have this::

[sdist_dsc]
force-buildsystem: False

To pass these commands to sdist_dsc when calling bdist_deb, do this::

python setup.py sdist_dsc --debian-version 0MyName1 bdist_deb

====================================== =========================================
Command line option Effect
====================================== =========================================
Expand Down
9 changes: 9 additions & 0 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ The --process-dependencies option to py2dsc was dropped, because this
functionality went beyond the scope of the py2dsc script. The
functionality could be added to a new script if desired.

The ability to pass command options to sdist_dsc by specifying them to
bdist_deb was removed. In other words, if you did this in the past::

python setup.py bdist_deb --no-backwards-compatibility

You must now do this::

python setup.py sdist_dsc --no-backwards-compatibility bdist_deb

Release 0.4.3
=============

Expand Down
5 changes: 3 additions & 2 deletions scripts/pypi-install
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ def main():
expanded_dir = entry

os.chdir( expanded_dir )
cmd = ('%s setup.py --command-packages=stdeb.command bdist_deb '
'--guess-conflicts-provides-replaces=True' % (sys.executable, ) )
cmd = ('%s setup.py --command-packages=stdeb.command sdist_dsc '
'--guess-conflicts-provides-replaces=True bdist_deb' %
(sys.executable, ) )
if options.verbose >= 2:
myprint('executing: %s'%cmd)
subprocess.check_call(cmd, shell=True)
Expand Down
18 changes: 14 additions & 4 deletions stdeb/command/bdist_deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@
import stdeb.util as util
from stdeb.command.sdist_dsc import sdist_dsc

from distutils.core import Command

__all__ = ['bdist_deb']

class bdist_deb(sdist_dsc):
class bdist_deb(Command):
description = 'distutils command to create debian binary package'

# extend the run method
user_options = []
boolean_options = []

def initialize_options (self):
pass

def finalize_options (self):
pass

def run(self):
# call parent run() method to generate .dsc source pkg
sdist_dsc.run(self)
# generate .dsc source pkg
self.run_command('sdist_dsc')

# execute system command and read output (execute and read output of find cmd)
dsc_tree = 'deb_dist'
Expand Down

0 comments on commit 5a67d2e

Please sign in to comment.