Skip to content

stray .pyc file prevents stdeb build #175

Closed

Description

@Qu-Bit

had to unpack and remove by hand: helpers.pyc
then setup worked

Activity

  1. scanny commented on Apr 20, 2015

    @scanny
    Contributor

    What was the full path and what symptom did you observe when it was in place?

  2. Qu-Bit commented on Apr 20, 2015

    @Qu-Bit
    Author

    trying install

    $ sudo pypi-install python-docx
    [sudo] password for mxyzptlk:
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    running the following command in directory: deb_dist/tmp_py2dsc/python-docx-0.8.5
    /usr/bin/python setup.py --command-packages stdeb.command sdist_dsc --dist-dir=/tmp/user/0/tmpGTOP_A/deb_dist --use-premade-distfile=/tmp/user/0/tmpGTOP_A/python-docx-0.8.5.tar.gz bdist_deb
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    running sdist_dsc
    running egg_info
    writing requirements to python_docx.egg-info/requires.txt
    writing python_docx.egg-info/PKG-INFO
    writing top-level names to python_docx.egg-info/top_level.txt
    writing dependency_links to python_docx.egg-info/dependency_links.txt
    reading manifest file 'python_docx.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'python_docx.egg-info/SOURCES.txt'
    Traceback (most recent call last):
    File "setup.py", line 81, in
    setup(**params)
    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.7/dist-packages/stdeb/command/sdist_dsc.py", line 123, in run
    raise RuntimeError('original source dist cannot '
    RuntimeError: original source dist cannot contain .pyc files
    ERROR running: /usr/bin/python setup.py --command-packages stdeb.command sdist_dsc --dist-dir=/tmp/user/0/tmpGTOP_A/deb_dist --use-premade-distfile=/tmp/user/0/tmpGTOP_A/python-docx-0.8.5.tar.gz bdist_deb
    ERROR in deb_dist/tmp_py2dsc/python-docx-0.8.5
    Traceback (most recent call last):
    File "/usr/bin/pypi-install", line 67, in
    main()
    File "/usr/bin/pypi-install", line 53, in main
    subprocess.check_call(cmd, shell=True)
    File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'py2dsc-deb python-docx-0.8.5.tar.gz' returned non-zero exit status 1

    look at the source package

    $ tar -xzvf python-docx-0.8.5.tar.gz
    $ cd python-docx-0.8.5/

    try a build inside

    $ python setup.py --command-packages=stdeb.command bdist_deb

    • lots of build-fu and:
      ... RuntimeError: original source dist cannot contain .pyc files

    where is it ?

    $ find . -name '*.pyc'

    ./features/steps/helpers.pyc
    ./deb_dist/tmp_sdist_dsc/python-docx-0.8.5/features/steps/helpers.pyc
    ./deb_dist/python-docx-0.8.5/features/steps/helpers.pyc

    removal of the file

    ./features/steps/helpers.pyc

    • before setup
    • allows build
    • allows install of built .deb
  3. added
    packaging
    on May 26, 2016
  4. scanny commented on Aug 18, 2018

    @scanny
    Contributor

    Fixed in release v0.8.7 circa Aug 18 2018.

  5. added 2 commits that reference this issue on Aug 18, 2018
    f884565
    aad71d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    packagingshortlist

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions