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

Install in editable mode does not use name in setup.py #42

Open
marskar opened this issue Jan 23, 2019 · 3 comments · May be fixed by #50
Open

Install in editable mode does not use name in setup.py #42

marskar opened this issue Jan 23, 2019 · 3 comments · May be fixed by #50

Comments

@marskar
Copy link

marskar commented Jan 23, 2019

Using virtualenv-api version 2.1.17,

I can install my_package and then print the package name:

from virtualenvapi.manage import VirtualEnvironment
env = VirtualEnvironment('.')
env.install('.')
print(env.installed_package_names)

Result:

['pip', 'setuptools', 'my_package', 'wheel']

Nice!

But, doing the same in editable mode does not give me the package name in setup.py.

from virtualenvapi.manage import VirtualEnvironment
env = VirtualEnvironment('.')
env.install('-e .')
print(env.installed_package_names)

Result:

['pip', 'setuptools', '-e git+https://github.com/marskar/package_name.git@6e7d262c1d9ad5047ada8b8ad471f3f1852dad87#egg=try', 'wheel']

According to the method docstring, -e . is supported.
https://github.com/sjkingo/virtualenv-api/blob/master/virtualenvapi/manage.py#L193
Is this the expected behavior?

@sjkingo
Copy link
Owner

sjkingo commented Jan 24, 2019

Could you please paste the install_requires of your setup.py?

Thanks

@marskar
Copy link
Author

marskar commented Jan 25, 2019

Hi @sjkingo,

My setup.py did not have an install_requires.

I tried it again with an install_requires and got the same result.

I was just testing this so my setup.py was mostly empty:

import setuptools

with open("README.rst", "r") as f:
    long_desc = f.read()
    
setuptools.setup(
    name='try',
    version='0.0.3',
    description='Automate creation of figures, models, and plots with GNU Make.',
    long_description=long_desc,
    long_description_content_type="text/x-rst",
    author='Martin Skarzynski',
    url='https://www.github.com/marskar/try/',
    license='MIT',
    packages=setuptools.find_packages(where='src'),
    package_dir={"": "src"},
    install_requires=['jupyter'],
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
)
['appnope', 'backcall', 'bleach', 'decorator', 'defusedxml', 'entrypoints', 'ipykernel', 'ipython', 'ipython-genutils', 'ipywidgets', 'jedi', 'jinja2', 'jsonschema', 'jupyter', 'jupyter-client', 'jupyter-console', 'jupyter-core', 'markupsafe', 'mistune', 'nbconvert', 'nbformat', 'notebook', 'pandocfilters', 'parso', 'pexpect', 'pickleshare', 'pip', 'prometheus-client', 'prompt-toolkit', 'ptyprocess', 'pygments', 'python-dateutil', 'pyzmq', 'qtconsole', 'send2trash', 'setuptools', 'six', 'terminado', 'testpath', 'tornado', 'traitlets', '-e git+https://github.com/marskar/package_name.git@6e7d262c1d9ad5047ada8b8ad471f3f1852dad87#egg=try', 'wcwidth', 'webencodings', 'wheel', 'widgetsnbextension']

@sjkingo
Copy link
Owner

sjkingo commented Jan 25, 2019

Ok, thanks - I will look into it and get back to you :)

dolfinus added a commit to dolfinus/virtualenv-api that referenced this issue May 13, 2021
Fixes sjkingo#42
Also allows to install packages with -e (editable) option
@dolfinus dolfinus linked a pull request May 13, 2021 that will close this issue
dolfinus added a commit to dolfinus/virtualenv-api that referenced this issue May 13, 2021
Fixes sjkingo#42
Also allows to install packages with -e (editable) option
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

Successfully merging a pull request may close this issue.

2 participants