Closed simahawk closed 6 years ago
The setup keywords are injected here. This code triggers when the odoo_addon
keyword is present in setup.py
.
It is actually setuptools-git, which is a dependency of setuptools-odoo, that finds the package data by looking at all files in the packages that are under git control. So indeed installing from a tarball that is disconnected from git will not work unless you add a MANIFEST.in.
Note that installing from a proper source distribution tarball (built with python setup.py sdist
) does work because that one includes the .egg-info metadata directory.
Also note that in the future, I would like to use setuptools-scm instead of setuptools-git because it is part of pypa and supports other vcses. But at this point it does not support symlinks.
What is your use case with tarballs, btw?
I see. Well, my aim is to be able to get rid of git clone and skip the release step (package on pypi or alike) at the same time. For private repos this would help a lot. But I guess I'm desiring too much, isn't it? :sweat_smile:
To release we do, pip wheel -r requirements.txt -d wheel-dir
. It gives you a bunch of wheels you can deploy without git (nor internet) access. Does that help in your scenario?
well I guess we can do that on build time and include this folder in our docker image. Is that what you do? Then what? You make pip find those wheels there instead of fetching from pypi I guess. /cc @guewen
Exactly that, yes.
I found a way here https://github.com/OCA/website-cms/pull/34 Maybe we can make a default (?)
I commented there.
About making the manifest a default, it's difficult to enumerate all files that could potentially be part of an odoo addon. It can be anything, potentially any data file.
I'm still not sure I understand in which scenarios you want to install from sources that are disconnected from git. Why do you want to skip the git clone? You mention private repos, but then getting the tarball from a private repo is not easier than a git clone.
We can do a call about that if you want to.
Well, potentially ALL files. Or at least all the ones that are not ignored by .gitignore.
But I've never seen files contained in odoo modules that should not be there...
I'd use even a *.*
to make sure we include everything :P
As for the scenario: would be great if we can make a call. Thanks! I'll poke you on either tomorrow or on Monday via IRC or hangout, ok?
Ok. Hangout preferably.
Installing from sources disconnected from git should be from a proper sdist. Also discussed in #24. So closing this one. Feel free to reopen if more discussion is needed.
19 showed that we can install addons statically (no editable mode + git clone).
The issue is that python installation works but odoo one no. Because...
This doc section says that some setuptools flags like
include_package_data
should be automatically handled but I don't see them in the auto-generated setup files. Also, AFAIR such flags rely on MANIFEST.in but there's no such file.Shouldn't we include such files explicitly for every repo?