-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Editable install does not work with package_dir #3160
Comments
Might be related to #3 |
Yes, it may be. The use case is different, though. |
Hello all, I believe that we are seeing this issue with xonsh (xonsh/xonsh#1126). Xonsh relies on implicit namespace packages. This prevents us from recommending that users install with |
Hey! It seems like it's been a while since this issue was active. Could someone try reproducing this on the current master? If it does still happen, please provide exact steps for how to reproduce. =) Thanks and sorry for the wait. |
I saw it happening when i ran |
@pietrodn Can you check if this is an issue when using pip to install the same package as editable? |
Sorry but I did not have time to do a complete test until now. pip$ mkdir test && cd test
$ pipenv --three
$ pipenv shell # enter virtualenv
$ git clone https://github.com/ArduPilot/pymavlink.git
$ cd pymavlink
$ git clone https://github.com/mavlink/mavlink.git mavlink # needed dependency
$ pip install -e .
$ python3 -c "import pymavlink"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pymavlink' setuptools$ mkdir test && cd test
$ pipenv --three
$ pipenv shell # enter virtualenv
$ git clone https://github.com/ArduPilot/pymavlink.git
$ cd pymavlink
$ git clone https://github.com/mavlink/mavlink.git mavlink # needed dependency
$ python setup.py develop
$ python3 -c "import pymavlink"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pymavlink' |
I believe the same problem is happening when trying to install allure-python-commons using pip editable. It also uses Not from master though, using pip 9.0.3 |
I am also having the same problem. I cannot install my library in development mode using the package_dir. My project structure could be reduced to something like this:
Inside my
When I do
On the other hand when we do
A workaround I found for development purposes is to then create a symlink in the development repository emulating the desired structured declared using |
@gzagatti What version of pip? Could you please open a new issue? |
@pradyunsg why open a new issue if the problem remains the same? Also, do you need any extra information to reproduce it? If you want to check this yourself, you can clone https://github.com/allure-framework/allure-python, pip install editable any of the projects and try importing a module. Basically it would nice to know the status about this one. Thanks! |
i believe this one is a setuptools issue, as editable installs dont go trough pip and wheels but trough setuptools alone |
The issue is reported in pypa/setuptools#230. It's a long-standing issue awaiting a fix. |
Thanks for looking into this @jaraco. I'll close this issue so that the interested people have one place to subscribe to. |
It is working with `setup.py install` and `pip install .`, but not with `setup.py develop` or `pip install -e .` See: pypa/pip#3160 pypa/setuptools#230
This is done to enable using `pip install -e .`, and to follow standard packaging rules. See: pypa/pip#3160 pypa/setuptools#230
* Move package requirements in setup.py for ease of installation * s/minatar_environment/minatar/, move environments into main package This is done to enable using `pip install -e .`, and to follow standard packaging rules. See: pypa/pip#3160 pypa/setuptools#230 * Update installation instructions in README.md * setup uses setuptools rather than disutils
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'd like to reduce the depth of my packages working tree, that usually look like
where
toplevel
and oftentoplevel.middle
are namespaces, and given that I mostly target Python 3 these days taking advantage of its implicit namespaces those directories do not even contain an__init__.py
.What I want is a shallow source tree, like
Distutls
package_dir
allows me to get there immediately, with a setup.py that looks likeUnfortunately this does not work with /editable/ installation of the package, as you can see by checking out this simple repo and running its runme.sh script: it creates two venvs and installs the silly package in both, one as a plain install and one in develop mode.
It that emits:
The text was updated successfully, but these errors were encountered: