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

my library is being built for some reason? #3106

Closed
AlJohri opened this Issue Oct 26, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@AlJohri
Contributor

AlJohri commented Oct 26, 2018

Issue description

I have a library called lib with a setup.py:

from setuptools import setup

setup(
    name='lib',
    packages=['lib'])

My Pipfile has this library listed as editable:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
jupyter = "*"
requests = "*"
numpy = "*"
elasticsearch = "*"
"requests-aws4auth" = "*"
"boto3" = "*"
arrow = "*"
elasticsearch-dsl = ">=6.0.0,<7.0.0"
"html2text" = "*"
requests-cache = "*"
lib = {editable = true, path = "."}
plotly = "*"
scipy = "*"

[dev-packages]
pylint = "*"

[requires]
python_version = "3.7"

For some reason, the lib gets built complete with a dist and build folder? Even though its an editable package? Why is this happening?

Expected result

I expect not build or dist folder to be created.

Actual result

Installing dependencies from Pipfile.lock (539eef)…
running install▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 65/66 — 00:00:01
running bdist_egg
running egg_info
writing lib.egg-info/PKG-INFO
writing dependency_links to lib.egg-info/dependency_links.txt
writing top-level names to lib.egg-info/top_level.txt
reading manifest file 'lib.egg-info/SOURCES.txt'
writing manifest file 'lib.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.13-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/lib
copying lib/textrazor.py -> build/lib/lib
copying lib/story.py -> build/lib/lib
copying lib/content_api.py -> build/lib/lib
copying lib/__init__.py -> build/lib/lib
copying lib/utils.py -> build/lib/lib
copying lib/meaningcloud.py -> build/lib/lib
copying lib/aylien.py -> build/lib/lib
creating build/bdist.macosx-10.13-x86_64
creating build/bdist.macosx-10.13-x86_64/egg
creating build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/textrazor.py -> build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/story.py -> build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/content_api.py -> build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/__init__.py -> build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/utils.py -> build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/meaningcloud.py -> build/bdist.macosx-10.13-x86_64/egg/lib
copying build/lib/lib/aylien.py -> build/bdist.macosx-10.13-x86_64/egg/lib
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/textrazor.py to textrazor.cpython-37.pyc
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/story.py to story.cpython-37.pyc
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/content_api.py to content_api.cpython-37.pyc
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/utils.py to utils.cpython-37.pyc
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/meaningcloud.py to meaningcloud.cpython-37.pyc
byte-compiling build/bdist.macosx-10.13-x86_64/egg/lib/aylien.py to aylien.cpython-37.pyc
creating build/bdist.macosx-10.13-x86_64/egg/EGG-INFO
copying lib.egg-info/PKG-INFO -> build/bdist.macosx-10.13-x86_64/egg/EGG-INFO
copying lib.egg-info/SOURCES.txt -> build/bdist.macosx-10.13-x86_64/egg/EGG-INFO
copying lib.egg-info/dependency_links.txt -> build/bdist.macosx-10.13-x86_64/egg/EGG-INFO
copying lib.egg-info/top_level.txt -> build/bdist.macosx-10.13-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/lib-0.0.0-py3.7.egg' and adding 'build/bdist.macosx-10.13-x86_64/egg' to it
removing 'build/bdist.macosx-10.13-x86_64/egg' (and everything under it)
Processing lib-0.0.0-py3.7.egg
Copying lib-0.0.0-py3.7.egg to /Users/johria/.pyenv/versions/3.7.0/lib/python3.7/site-packages
Adding lib 0.0.0 to easy-install.pth file

Installed /Users/johria/.pyenv/versions/3.7.0/lib/python3.7/site-packages/lib-0.0.0-py3.7.egg
Processing dependencies for lib==0.0.0
Finished processing dependencies for lib==0.0.0
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 66/66 — 00:01:08
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).


$ pipenv --support

Pipenv version: '2018.10.13'

Pipenv location: '/Users/johria/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv'

Python location: '/Users/johria/.pyenv/versions/3.7.0/bin/python3.7'

Python installations found:

Error %s while executing command %s name 'WindowsError' is not defined /usr/local/bin/pythonz -c import sys; print(sys.version.split()[0])

@techalchemy

This comment has been minimized.

Member

techalchemy commented Oct 27, 2018

Editable dependencies are built to determine their dependencies — this is not new or exclusive to pipenv. We can remove the folders though.

The other issue is already reported and a fix is in progress. Sorry for the trouble.

@AlJohri

This comment has been minimized.

Contributor

AlJohri commented Oct 29, 2018

@techalchemy got it, yeah, I think deleting the extra folders would be great

@techalchemy

This comment has been minimized.

Member

techalchemy commented Oct 29, 2018

hm we should actually be building this in a tempdir, can you try pip install -e git+https://github.com/pypa/pipenv.git@update-vendor#egg=pipenv and see if this still happens?

@techalchemy techalchemy self-assigned this Oct 29, 2018

techalchemy added a commit that referenced this issue Nov 2, 2018

Don't write build artifacts to cwd
- Fixes #3106

Signed-off-by: Dan Ryan <dan@danryan.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment