Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pex --index-url=... fails in 2.0.0 #794

Closed
Djailla opened this issue Nov 15, 2019 · 1 comment
Closed

pex --index-url=... fails in 2.0.0 #794

Djailla opened this issue Nov 15, 2019 · 1 comment

Comments

@Djailla
Copy link
Contributor

Djailla commented Nov 15, 2019

Hello,

In my team we have an issue since this morning with the new version of PEX

This is a big Django project but with simple configuration.

Here is an extract of the setup.py

setuptools.setup(
    name='rackguru-api',
    version=find_version(),
    install_requires=_INSTALL_REQUIRES,
    author='Criteo',
    author_email='[email protected]',
    description='Criteo datacenter assets manager',
    packages=setuptools.find_packages(),
    entry_points={
        'console_scripts': [
            'rackguru-run = marathon.run:main',
        ],
    },
    classifiers=CLASSIFIERS,
    include_package_data=True,
)

In the tox.ini :

# Bundle environment
[testenv:bundle]
deps = pex
setenv =
    LANG=en_US.UTF-8
commands =
    # Collect the statics to be embedded in the sdist and PEX file (via the MANIFEST)
    {envpython} manage.py collectstatic --noinput --clear
    # Creates a source archive in sdist/
    {envpython} setup.py sdist --dist-dir=sdist --format=gztar
    # Build exec file and save it in dist/
    {envpython} setup.py bdist_pex --bdist-dir=dist --pex-args='--disable-cache --not-zip-safe --index-url=http://build-nexus.crto.in/repository/pypi/simple' --bdist-all

And here is the build output :

bundle run-test: commands[2] | /tmp/.tox-rackguru-api-post-submit-3573/com.criteo.rackguru.rackguru-api/bundle/bin/python setup.py bdist_pex --bdist-dir=dist '--pex-args=--disable-cache --not-zip-safe --index-url=http://build-nexus.crto.in/repository/pypi/simple' --bdist-all
running bdist_pex
Writing rackguru-run to dist/rackguru-run
Failed to create pex via /tmp/.tox-rackguru-api-post-submit-3573/com.criteo.rackguru.rackguru-api/bundle/bin/python3.6 -s -m pex /home/jenkins/workspace/rackguru-api-post-submit --disable-cache --not-zip-safe --index-url=http://build-nexus.crto.in/repository/pypi/simple --output-file dist/rackguru-run --script rackguru-run:
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/.tox-rackguru-api-post-submit-3573/com.criteo.rackguru.rackguru-api/bundle/lib/python3.6/site-packages/pex/__main__.py", line 8, in <module>
    __name__ == '__main__' and pex.main()
  File "/tmp/.tox-rackguru-api-post-submit-3573/com.criteo.rackguru.rackguru-api/bundle/lib/python3.6/site-packages/pex/bin/pex.py", line 628, in main
    pex_builder = build_pex(reqs, options)
  File "/tmp/.tox-rackguru-api-post-submit-3573/com.criteo.rackguru.rackguru-api/bundle/lib/python3.6/site-packages/pex/bin/pex.py", line 540, in build_pex
    indexes = [str(index) for index in options.indexes]
  File "/tmp/.tox-rackguru-api-post-submit-3573/com.criteo.rackguru.rackguru-api/bundle/lib/python3.6/site-packages/pex/bin/pex.py", line 540, in <listcomp>
    indexes = [str(index) for index in options.indexes]
TypeError: __str__ returned non-string (type NoneType)

Do you have any idea about the root issue ?

@Djailla
Copy link
Contributor Author

Djailla commented Nov 15, 2019

The issue looks like related to the --index-url options, will digg into

@Djailla Djailla changed the title Pex 2.0.0 fails to build where it was ok with 1.6.x pex --index-url=... fails in 2.0.0 Nov 18, 2019
@jsirois jsirois mentioned this issue Nov 20, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant