question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation of sdist is (silently) failing

See original GitHub issue

Thank you for this very useful package! Unfortunately, I’m unable to test sdists.

My noxfile.py:

import nox
from nox_poetry import installroot, install, SDIST, WHEEL

PYTHONS = ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3.6', 'pypy3.7']
DEPENDENCIES = ['pytest', 'pytest-xdist', 'pytest-cov', 'coverage', 'pygments',
                'Sphinx']

@nox.session(python=PYTHONS)
def unit(session):
    installroot(session, distribution_format=SDIST)
    install(session, *DEPENDENCIES)
    session.run('python', 'run_tests.py', *session.posargs, 'tests')
<tt>$ nox -v -rs unit-3.8</tt>
nox > Running session unit-3.8
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/unit-3-8
created virtual environment CPython3.8.7.final.0-64 in 576ms
  creator CPython3Posix(dest=/Users/brechtm/Documents/Code/rinohtype/.nox/unit-3-8, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/brechtm/Library/Application Support/virtualenv)
    added seed packages: pip==20.3.3, setuptools==51.0.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

nox > poetry build --format=sdist
Building rinohtype (0.5.0-dev.1)
  - Building sdist
  - Built rinohtype-0.5.0.dev1.tar.gz

nox > poetry export --format=requirements.txt --output=.nox/unit-3-8/tmp/requirements.txt --dev --without-hashes
nox > pip uninstall --yes file:///Users/brechtm/Documents/Code/rinohtype/dist/rinohtype-0.5.0.dev1.tar.gz#sha256=0ce6a74e1004f4576c87e0a931a2a9f849a852f592ced55ab05aac26c8acf2e1&egg=rinohtype
WARNING: Skipping rinohtype as it is not installed.

nox > python -m pip install --constraint=.nox/unit-3-8/tmp/requirements.txt file:///Users/brechtm/Documents/Code/rinohtype/dist/rinohtype-0.5.0.dev1.tar.gz#sha256=0ce6a74e1004f4576c87e0a931a2a9f849a852f592ced55ab05aac26c8acf2e1&egg=rinohtype
Processing ./dist/rinohtype-0.5.0.dev1.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting appdirs<2.0.0,>=1.4.4
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting docutils<0.17,>=0.16
  Using cached docutils-0.16-py2.py3-none-any.whl (548 kB)
Collecting recommonmark<0.7.0,>=0.6.0
  Using cached recommonmark-0.6.0-py2.py3-none-any.whl (10 kB)
Collecting commonmark>=0.8.1
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting rinoh-typeface-dejavuserif<0.2.0,>=0.1.3
  Using cached rinoh_typeface_dejavuserif-0.1.3-py3-none-any.whl (1.7 MB)
Collecting rinoh-typeface-texgyrecursor<0.2.0,>=0.1.1
  Using cached rinoh_typeface_texgyrecursor-0.1.1-py3-none-any.whl (242 kB)
Collecting rinoh-typeface-texgyreheros<0.2.0,>=0.1.1
  Using cached rinoh_typeface_texgyreheros-0.1.1-py3-none-any.whl (523 kB)
Collecting rinoh-typeface-texgyrepagella<0.2.0,>=0.1.1
  Using cached rinoh_typeface_texgyrepagella-0.1.1-py3-none-any.whl (321 kB)
Collecting sphinx>=1.3.1
  Using cached Sphinx-3.4.3-py3-none-any.whl (2.9 MB)
Requirement already satisfied: setuptools in ./.nox/unit-3-8/lib/python3.8/site-packages (from sphinx>=1.3.1->recommonmark<0.7.0,>=0.6.0->rinohtype) (51.0.0)
Collecting alabaster<0.8,>=0.7
  Using cached alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting babel>=1.3
  Using cached Babel-2.9.0-py2.py3-none-any.whl (8.8 MB)
Collecting Jinja2>=2.3
  Using cached Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting MarkupSafe>=0.23
  Using cached MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl (16 kB)
Collecting Pygments>=2.0
  Using cached Pygments-2.7.4-py3-none-any.whl (950 kB)
Collecting pytz>=2015.7
  Using cached pytz-2020.5-py2.py3-none-any.whl (510 kB)
Collecting requests>=2.5.0
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet<5,>=3.0.2
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting snowballstemmer>=1.1
  Using cached snowballstemmer-2.0.0-py2.py3-none-any.whl (97 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Collecting imagesize
  Using cached imagesize-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting packaging
  Using cached packaging-20.8-py2.py3-none-any.whl (39 kB)
Collecting pyparsing>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting sphinxcontrib-applehelp
  Using cached sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
Collecting sphinxcontrib-devhelp
  Using cached sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
Collecting sphinxcontrib-htmlhelp
  Using cached sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl (96 kB)
Collecting sphinxcontrib-jsmath
  Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting sphinxcontrib-qthelp
  Using cached sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
Collecting sphinxcontrib-serializinghtml
  Using cached sphinxcontrib_serializinghtml-1.1.4-py2.py3-none-any.whl (89 kB)
Building wheels for collected packages: rinohtype
  Building wheel for rinohtype (PEP 517): started
  Building wheel for rinohtype (PEP 517): finished with status 'done'
  Created wheel for rinohtype: filename=rinohtype-0.5.0.dev1-py3-none-any.whl size=16382 sha256=f06b9496e25e6317da97eb9b5b756b9d947ffec6fbc4a68156d70042d35e6200
  Stored in directory: /Users/brechtm/Library/Caches/pip/wheels/b9/48/00/5eea4e606f55ae9a66c4e7a51180b04385eed8c74f71ab901b
Successfully built rinohtype
Installing collected packages: urllib3, pytz, pyparsing, MarkupSafe, idna, chardet, certifi, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, snowballstemmer, requests, Pygments, packaging, Jinja2, imagesize, docutils, babel, alabaster, sphinx, commonmark, rinoh-typeface-texgyrepagella, rinoh-typeface-texgyreheros, rinoh-typeface-texgyrecursor, rinoh-typeface-dejavuserif, recommonmark, appdirs, rinohtype
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Pygments-2.7.4 alabaster-0.7.12 appdirs-1.4.4 babel-2.9.0 certifi-2020.12.5 chardet-4.0.0 commonmark-0.9.1 docutils-0.16 idna-2.10 imagesize-1.2.0 packaging-20.8 pyparsing-2.4.7 pytz-2020.5 recommonmark-0.6.0 requests-2.25.1 rinoh-typeface-dejavuserif-0.1.3 rinoh-typeface-texgyrecursor-0.1.1 rinoh-typeface-texgyreheros-0.1.1 rinoh-typeface-texgyrepagella-0.1.1 rinohtype-0.5.0.dev1 snowballstemmer-2.0.0 sphinx-3.4.3 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.4 urllib3-1.26.2
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/Users/brechtm/Documents/Code/rinohtype/.nox/unit-3-8/bin/python -m pip install --upgrade pip' command.

nox > python -m pip install --constraint=.nox/unit-3-8/tmp/requirements.txt pytest pytest-xdist pytest-cov coverage pygments Sphinx
<SNIPPED>

nox > python run_tests.py tests
====================================== test session starts =======================================
platform darwin -- Python 3.8.7, pytest-6.1.2, py-1.10.0, pluggy-0.13.1
rootdir: /Users/brechtm/Documents/Code/rinohtype, configfile: setup.cfg
plugins: cov-2.11.1, xdist-2.2.0, forked-1.3.0
gw0 [0] / gw1 [0] / gw2 [0] / gw3 [0] / gw4 [0] / gw5 [0] / gw6 [0] / gw7 [0]

============================================= ERRORS =============================================
____________________________ ERROR collecting tests/test_attribute.py ____________________________
ImportError while importing test module '/Users/brechtm/Documents/Code/rinohtype/tests/test_attribute.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../.pyenv/versions/3.8.7/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_attribute.py:11: in <module>
    from rinoh.attribute import Attribute, Bool
E   ModuleNotFoundError: No module named 'rinoh'
<SNIPPED>

For some reason the rinoh package is missing, but the dist-info file is present:

$ ls -d .nox/unit-3-8/lib/python3.8/site-packages/rinoh*
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_dejavuserif
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_dejavuserif-0.1.3.dist-info
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_texgyrecursor
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_texgyrecursor-0.1.1.dist-info
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_texgyreheros
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_texgyreheros-0.1.1.dist-info
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_texgyrepagella
.nox/unit-3-8/lib/python3.8/site-packages/rinoh_typeface_texgyrepagella-0.1.1.dist-info
.nox/unit-3-8/lib/python3.8/site-packages/rinohtype-0.5.0.dev1.dist-info

Testing the wheel works fine, though. Using tox, I can test both the sdist and wheel.

I tried to install the sdist by using the same command as executed by nox-poetry (quotes added):

.nox/unit-3-8/bin/python -m pip install --constraint=.nox/unit-3-8/tmp/requirements.txt \
    "file:///Users/brechtm/Documents/Code/rinohtype/dist/rinohtype-0.5.0.dev1.tar.gz#sha256=0ce6a74e1004f4576c87e0a931a2a9f849a852f592ced55ab05aac26c8acf2e1&egg=rinohtype"

This neither yields the rinoh directory. However, when I drop the sha256 bit, it does appear:

.nox/unit-3-8/bin/python -m pip install --constraint=.nox/unit-3-8/tmp/requirements.txt \
    "file:///Users/brechtm/Documents/Code/rinohtype/dist/rinohtype-0.5.0.dev1.tar.gz#egg=rinohtype"

I’m not sure what’s going on here. Possibly this is an issue in pip instead.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brechtmcommented, Mar 14, 2021

Thanks for the additional info! Can you see if #298 works for you?

I tested 0.8.2, which works. Now I can finally migrate from tox to nox 😃

1reaction
cjolowiczcommented, Mar 14, 2021

Released in 0.8.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup.py sdist not including all files - Open Source Hacker
Setuptools has many silent failure modes. One of them is failure to include all files in sdist release (well not exactly a failure, ......
Read more >
Don't use `python setup.py sdist bdist_wheel` in release CI ...
Currently our release CI workflow uses python setup.py sdist bdist_wheel to create the sdist and wheel artifacts which are uploaded to PyPI ...
Read more >
Issue 25392: setup.py --quiet doesn't silence "no previously ...
msg252927 ‑ (view) Author: Ned Batchelder (nedbat) * Date: 2015‑10‑13 11:45 msg252929 ‑ (view) Author: Ionel Cristian Mărieș (ionelmc) Date: 2015‑10‑13 13:13 msg252934 ‑ (view)...
Read more >
python - What's wrong with this `setup.py`? - Stack Overflow
The problem is well explained here: Setuptools has many silent failure modes. One of them is failure to include all files in sdist...
Read more >
Bug #1962027 “lpcraft silently continues when requesting ...
... the package installation step fails silently (no output is reported to ... 2022-02-23 11:14:49.837 :: * Getting dependencies for sdist.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found