-
Notifications
You must be signed in to change notification settings - Fork 48
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
pip install local and pip install VCS broken #14
Comments
@etherealite you are hitting this pip issue: pypa/pip#3500 Workarounds are |
Ok thanks for identifying the source of the issue. I'm facing a similar problem when installing the same module from a git fork. I'm assuming that this issue is attributed to PIP, but wanted to see if you could confirm. Ive forked a OCA mono repo, modified a single module and tried to install it. user@host:~/$ pip install -e \
"git+https://github.com/etherealite/[email protected]"\
"#egg=odoo10_addon_barcodes_generator_abstract"\
"&subdirectory=setup/barcodes_generator_abstract"
Cloning https://github.com/etherealite/stock-logistics-barcode.git (to 10.0) to ./py2/src/odoo10-addon-barcodes-generator-abstract
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/home/user/odoo/py2/src/odoo10-addon-barcodes-generator-abstract/setup.py' You can see that pip is looking for Cloned directory for clarity, user@host: ls /home/user/odoo/py2/src/odoo10-addon-barcodes-generator-abstract
drwxrwxr-x 4 user user 4096 Aug 7 22:29 barcode_link
drwxrwxr-x 8 user user 4096 Aug 7 22:29 barcodes_generator_abstract
drwxrwxr-x 8 user user 4096 Aug 7 22:29 barcodes_generator_location
drwxrwxr-x 8 user user 4096 Aug 7 22:29 barcodes_generator_lot
drwxrwxr-x 8 user user 4096 Aug 7 22:29 barcodes_generator_package
drwxrwxr-x 8 user user 4096 Aug 7 22:29 barcodes_generator_partner
drwxrwxr-x 8 user user 4096 Aug 7 22:29 barcodes_generator_product
drwxrwxr-x 6 user user 4096 Aug 7 22:29 base_gs1_barcode
-rw-rw-r-- 1 user user 34499 Aug 7 22:29 LICENSE
drwxrwxr-x 3 user user 4096 Aug 7 22:29 product_multi_ean
-rw-rw-r-- 1 user user 2152 Aug 7 22:29 README.md
-rw-rw-r-- 1 user user 47 Aug 7 22:29 requirements.txt
drwxrwxr-x 9 user user 4096 Aug 7 22:29 setup
drwxrwxr-x 13 user user 4096 Aug 7 22:29 stock_scanner |
works for me in bash. The backslash before |
As a side note, I recommend always using -e when installing from a git branch as it allows |
@sbidoul THANK YOU! This has been plaguing me for so long; to think it was something as simple as making the mistake of double quoting a string when I should have single quoted it. Every once in awhile people come to realize that they to can come to exemplify the age old adage "The problem is usually somewhere between the keyboard and the chair." This is working fine on my up to date development system, but there is a problem with the pip version that ships with the Odoo official Docker image ships with an APT managed PIP 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7). If you try and run the Commandpip install -e git+https://github.com/etherealite/[email protected]#egg=odoo10_addon_barcodes_generator_abstract\&subdirectory=setup/barcodes_generator_abstract You get a possibly related to pypa/pip#3500 symlink issue rearing its ugly head all over again Error Messageroot@6b5882296b55:~# pip install -e git+https://github.com/etherealite/[email protected]#egg=odoo10_addon_barcodes_generator_abstract\&subdirectory=setup/barcodes_generator_abstract
Obtaining odoo10_addon_barcodes_generator_abstract from git+https://github.com/etherealite/[email protected]#egg=odoo10_addon_barcodes_generator_abstract&subdirectory=setup/barcodes_generator_abstract
Updating ./src/odoo10-addon-barcodes-generator-abstract clone (to 10.0)
Running setup.py (path:/root/src/odoo10-addon-barcodes-generator-abstract/setup/barcodes_generator_abstract/setup.py) egg_info for package odoo10-addon-barcodes-generator-abstract
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/root/src/odoo10-addon-barcodes-generator-abstract/setup/barcodes_generator_abstract/setup.py", line 5, in <module>
odoo_addon=True,
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 319, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 386, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/setup_keywords.py", line 61, in odoo_addon
odoo_version_override=odoo_version_override,
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 273, in prepare_odoo_addon
addons_dir, addons_ns = _find_addons_dir()
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 218, in _find_addons_dir
raise RuntimeError("No addons namespace found.")
RuntimeError: No addons namespace found.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/root/src/odoo10-addon-barcodes-generator-abstract/setup/barcodes_generator_abstract/setup.py", line 5, in <module>
odoo_addon=True,
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 319, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 386, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/setup_keywords.py", line 61, in odoo_addon
odoo_version_override=odoo_version_override,
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 273, in prepare_odoo_addon
addons_dir, addons_ns = _find_addons_dir()
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 218, in _find_addons_dir
raise RuntimeError("No addons namespace found.")
RuntimeError: No addons namespace found.
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /root/src/odoo10-addon-barcodes-generator-abstract
Storing debug log for failure in /root/.pip/pip.log Contents of Log File------------------------------------------------------------
/usr/bin/pip run on Wed Aug 9 00:06:51 2017
Obtaining odoo10_addon_barcodes_generator_abstract from git+https://github.com/etherealite/[email protected]#egg=odoo10_addon_barcodes_generator_abstract&subdirectory=setup/barcodes_generator_abstract
Found command 'git' at '/usr/bin/git'
Running command /usr/bin/git config remote.origin.url
https://github.com/etherealite/stock-logistics-barcode.git
Clone in ./src/odoo10-addon-barcodes-generator-abstract exists, and has correct URL (https://github.com/etherealite/stock-logistics-barcode.git)
Updating ./src/odoo10-addon-barcodes-generator-abstract clone (to 10.0)
Running command /usr/bin/git fetch -q
Running command /usr/bin/git show-ref
7db0d6b27d4fcbaff5d05043dd5e3b60969d16d5 refs/heads/10.0
7db0d6b27d4fcbaff5d05043dd5e3b60969d16d5 refs/remotes/origin/10.0
dcdbf2bb68f8156f4c154ebee572ec3fedaeab28 refs/remotes/origin/6.1
24894e30c4f3e46f004516d665edd6d907e5ed35 refs/remotes/origin/7.0
f0590519e66ce7fd6f022b9d440e7ce1b18ffd9d refs/remotes/origin/8.0
25cf9cb8326d308e6378e12bea68344f383e5d32 refs/remotes/origin/9.0
7db0d6b27d4fcbaff5d05043dd5e3b60969d16d5 refs/remotes/origin/HEAD
b97cdbc8c861535ecfd90499c4766cf60369b780 refs/remotes/origin/patch-1
Running command /usr/bin/git reset --hard -q 7db0d6b27d4fcbaff5d05043dd5e3b60969d16d5
Running setup.py (path:/root/src/odoo10-addon-barcodes-generator-abstract/setup/barcodes_generator_abstract/setup.py) egg_info for package odoo10-addon-barcodes-generator-abstract
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/root/src/odoo10-addon-barcodes-generator-abstract/setup/barcodes_generator_abstract/setup.py", line 5, in <module>
odoo_addon=True,
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 319, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 386, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/setup_keywords.py", line 61, in odoo_addon
odoo_version_override=odoo_version_override,
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 273, in prepare_odoo_addon
addons_dir, addons_ns = _find_addons_dir()
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 218, in _find_addons_dir
raise RuntimeError("No addons namespace found.")
RuntimeError: No addons namespace found.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/root/src/odoo10-addon-barcodes-generator-abstract/setup/barcodes_generator_abstract/setup.py", line 5, in <module>
odoo_addon=True,
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 319, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 386, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/setup_keywords.py", line 61, in odoo_addon
odoo_version_override=odoo_version_override,
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 273, in prepare_odoo_addon
addons_dir, addons_ns = _find_addons_dir()
File "/usr/local/lib/python2.7/dist-packages/setuptools_odoo/core.py", line 218, in _find_addons_dir
raise RuntimeError("No addons namespace found.")
RuntimeError: No addons namespace found.
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /root/src/odoo10-addon-barcodes-generator-abstract
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1146, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 326, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 716, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /root/src/odoo10-addon-barcodes-generator-abstract |
It will never work with such an old pip version. |
Ok great, you've been a tremendous help, thanks for clearing everything up for me. I find it silly that the Docker Hub official Odoo image doesn't support this awesome tool. I guess I will have to search around for an image with non apt-get installed pip, maybe some OCA member has put something together. Can we get something in the README for people who have faced this problem? I'm thinking you could add a couple of new sections to warn people about the caveats that I ran into: RequirementsOdoo >= 7.0.0 Installing a Package from a Multi-Addon RepositoryWhen installing a package directory from a source repository using the PIP install VCS option
|
@etherealite I improved the readme in #15, can you please review that PR? |
When you checkout a typical OCS Odoo addon repo, in my case stock-logistics-barcode you can't install it from the repo directory using pip.
Environment Information
odoo version is irrelevant.
Repro Steps
To investigate further let's go into the tmp build directory and see what's going on.
The symlink to barcodes_generator_abstract leads to nowhere.
Looks like setup tools is not dereferencing
barcodes_generator_abstract -> ../../../../barcodes_generator_abstract
. When odoo-setuptools attempts to find the non-existant../../../../barcodes_generator_abstract/__manifest__.py
, it finds nothing and gives up.Strangely enough, when you run
python setup.py install
manually everything works fine.The text was updated successfully, but these errors were encountered: