Impossible to install a custom module which inherit from other custom module

31 views
Skip to first unread message

Richmond Fiko

unread,
Sep 4, 2018, 4:57:06 PM9/4/18
to tryton-dev
Hello,

I create a custom module which inherit from some others custom modules.
I follow all steps and I mark the parent modules inside tryton.cfg file
inside "depends:" part.
When I install module with command "pip install /link_to_module/", it seems that tryton try to download the parent modules and throw me an error:

Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/models.py", line 893, in raise_for_status
raise HTTPError(http_error_msg, response=self)
pip._vendor.requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/trytond-name-of-parent-custom-modules/

I don't understand...

Sergi Almacellas Abellana

unread,
Sep 5, 2018, 4:23:52 AM9/5/18
to tryto...@googlegroups.com
On 9/4/18 10:42 PM, Richmond Fiko wrote:
> Hello,
>
> I create a custom module which inherit from some others custom modules.
> I follow all steps and I mark the parent modules inside tryton.cfg file
> inside "depends:" part.

If you are using the default cookiecutter template it reads the
tryton.cfg to download the dependencies from pypi using the trytond prefix.

You should modify your setup.py to include your company prefix on the
MODULES2PREFIX to make the module download the name with your custom
prefix.

If you do not have your parent module uploaded to pypi you should
manually install it before installing the dependant module or modify
setup.py to include the location for where the module should be
downloaded and installed.

Hope it helps!

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
Reply all
Reply to author
Forward
0 new messages