There is a warning in the setup.py output that I think that's the key, but I have no idea about why is happening:
warning: install_lib: 'build/lib' does not exist -- no Python modules to install
In order to reproduce the issue, we clone the linked repository, checkout the feature/custom-filters branch. Then, we remove all setup/ folder.
setuptools-odoo-make-default -d .
That produces the expected output. A new setup folder with one subfolder for each module inside, containing the setup.py and the sources under the ./odoo/addons/ subfolders
cd setup/community_maps and python setup.py bdist_wheel --universal sdist also works as expected. The package is created.
cd ../community_maps_landings to get in setup/community_maps_landings.
python setup.py bdist_wheel --universal sdist produces the empty package and the next output
running bdist_wheel
running build
running build_py
package init file 'odoo/addons/__init__.py' not found (or not a regular file)
running egg_info
creating odoo12_addon_community_maps_landings.egg-info
writing manifest file 'odoo12_addon_community_maps_landings.egg-info/SOURCES.txt'
writing manifest file 'odoo12_addon_community_maps_landings.egg-info/SOURCES.txt'
running install
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install
running install_egg_info
Copying odoo12_addon_community_maps_landings.egg-info to build/bdist.linux-x86_64/wheel/odoo12_addon_community_maps_landings-12.0.0.0.1.99.dev1-py3.10.egg-info
running install_scripts
running sdist
warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md
running check
warning: check: missing meta-data: if 'author' supplied, 'author_email' should be supplied too
Actually, setuptools uses git to determine what to add to the wheel.
So you need to commit the files setuptools-odoo-make-default generated, and it will work.
Hello! We are facing an issue when trying to package a particular module. (this one,
community_maps_landings
).The problem is that the package is empty, only containing basic packaging files. This is reflected also in
SOURCES.txt
contents:There is a warning in the
setup.py
output that I think that's the key, but I have no idea about why is happening:warning: install_lib: 'build/lib' does not exist -- no Python modules to install
In order to reproduce the issue, we clone the linked repository, checkout the
feature/custom-filters
branch. Then, we remove allsetup/
folder.setuptools-odoo-make-default -d .
That produces the expected output. A newsetup
folder with one subfolder for each module inside, containing thesetup.py
and the sources under the./odoo/addons/
subfolderscd setup/community_maps
andpython setup.py bdist_wheel --universal sdist
also works as expected. The package is created.cd ../community_maps_landings
to get insetup/community_maps_landings
.python setup.py bdist_wheel --universal sdist
produces the empty package and the next outputrunning install_egg_info Copying odoo12_addon_community_maps_landings.egg-info to build/bdist.linux-x86_64/wheel/odoo12_addon_community_maps_landings-12.0.0.0.1.99.dev1-py3.10.egg-info running install_scripts running sdist warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md
running check warning: check: missing meta-data: if 'author' supplied, 'author_email' should be supplied too
creating odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1 creating odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info copying setup.py -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1 copying odoo12_addon_community_maps_landings.egg-info/PKG-INFO -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info copying odoo12_addon_community_maps_landings.egg-info/SOURCES.txt -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info copying odoo12_addon_community_maps_landings.egg-info/dependency_links.txt -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info copying odoo12_addon_community_maps_landings.egg-info/not-zip-safe -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info copying odoo12_addon_community_maps_landings.egg-info/requires.txt -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info copying odoo12_addon_community_maps_landings.egg-info/top_level.txt -> odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1/odoo12_addon_community_maps_landings.egg-info Creating tar archive removing 'odoo12-addon-community_maps_landings-12.0.0.0.1.99.dev1' (and everything under it)
bleach==5.0.1 certifi==2022.6.15 cffi==1.15.1 charset-normalizer==2.1.0 commonmark==0.9.1 cryptography==37.0.4 docutils==0.19 idna==3.3 importlib-metadata==4.12.0 jeepney==0.8.0 keyring==23.8.2 packaging==21.3 pkginfo==1.8.3 pycparser==2.21 Pygments==2.12.0 pyparsing==3.0.9 readme-renderer==36.0 requests==2.28.1 requests-toolbelt==0.9.1 rfc3986==2.0.0 rich==12.5.1 SecretStorage==3.3.2 setuptools-odoo==3.1.1 setuptools-scm==7.0.5 six==1.16.0 tomli==2.0.1 twine==4.0.1 typing_extensions==4.3.0 urllib3==1.26.11 webencodings==0.5.1 zipp==3.8.1