NameError: name 'RULES_BINARY_ALL_TARGET' is not defined

Bug #1518448 reported by Geoff Clements
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
stdeb (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Running this command:
$ sudo python3 setup.py --command-packages=stdeb.command sdist_dsc --debian-version ppa1

Produces this output:
running sdist_dsc
running egg_info
writing entry points to ravenc.egg-info/entry_points.txt
writing top-level names to ravenc.egg-info/top_level.txt
writing dependency_links to ravenc.egg-info/dependency_links.txt
writing requirements to ravenc.egg-info/requires.txt
writing ravenc.egg-info/PKG-INFO
reading manifest file 'ravenc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.xml' under directory 'ravenc'
writing manifest file 'ravenc.egg-info/SOURCES.txt'
Traceback (most recent call last):
  File "setup.py", line 34, in <module>
    entry_points = {'gui_scripts': ['ravenc = ravenc.ravenc:run']}
  File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/stdeb/command/sdist_dsc.py", line 27, in run
    debinfo = self.get_debinfo()
  File "/usr/lib/python3/dist-packages/stdeb/command/common.py", line 226, in get_debinfo
    allow_virtualenv_install_location=self.allow_virtualenv_install_location,
  File "/usr/lib/python3/dist-packages/stdeb/util.py", line 1102, in __init__
    RULES_BINARY_ALL_TARGET%self.__dict__ + \
NameError: name 'RULES_BINARY_ALL_TARGET' is not defined

A quick look into utils.py shows that RULES_BINARY_ALL_TARGET is not defined BUT looking at the package source in launchpad AND looking at the github version shows that it IS defined. Something odd has gone on in the Ubuntu packaging.

For reference:
The end of utils.py on github looks like this:
RULES_OVERRIDE_INSTALL_TARGET = """
override_dh_auto_install:
%(rules_override_install_target_pythons)s
%(scripts_cleanup)s
"""

RULES_OVERRIDE_PYTHON3 = """
override_dh_python3:
        dh_python3
%(scripts)s
"""

RULES_BINARY_TARGET = """
binary: binary-arch binary-indep
"""

RULES_BINARY_ALL_TARGET = """
binary: binary-indep
"""

RULES_BINARY_ARCH_TARGET = """
binary-arch: build
%(dh_binary_arch_lines)s
"""

RULES_BINARY_INDEP_TARGET = """
binary-indep: build
%(dh_binary_indep_lines)s
%(dh_installmime_indep_line)s
%(dh_desktop_indep_line)s
"""

and installed on my system like this:
CONTROL_PY2_STANZA = """
Package: %(package)s
Architecture: %(architecture)s
Depends: %(depends)s
%(package_stanza_extras)sDescription: %(description)s
%(long_description)s
"""

CONTROL_PY3_STANZA = """
Package: %(package3)s
Architecture: %(architecture3)s
Depends: %(depends3)s
%(package_stanza_extras3)sDescription: %(description)s
%(long_description)s
"""

RULES_MAIN = """\
#!/usr/bin/make -f

# This file was automatically generated by stdeb %(stdeb_version)s at
# %(date822)s
%(exports)s
%(percent_symbol)s:
        dh $@ %(sequencer_options)s

%(override_dh_auto_install)s

%(binary_target_lines)s
"""

RULES_OVERRIDE_INSTALL_TARGET = """
override_dh_auto_install:
    dh_auto_install
%(scripts_cleanup)s
"""

RULES_BINARY_ARCH_TARGET = """
binary-arch: build
%(dh_binary_arch_lines)s
"""

RULES_BINARY_INDEP_TARGET = """
binary-indep: build
%(dh_binary_indep_lines)s
%(dh_installmime_indep_line)s
%(dh_desktop_indep_line)s
"""

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in stdeb (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.