PBR

pbr should support package_dir

Bug #1374254 reported by Zachary Roadhouse
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
PBR
Confirmed
Wishlist
Unassigned

Bug Description

Our python packages locate source under the src directory instead of under the root directory. This is no problem for setuputils, since it provides the package_dir option. Example:

setup(
    ...
    packages=find_packages('src'),
    package_dir={'': 'src'},
    ...
)

Please add support to pbr for alternative source organization conventions like src that are supported by package_dir. Current behavior of pbr is to include the src dir and everything under it (leading to incorrect package paths).

Revision history for this message
Kenny Jones (kenny-jones) wrote :

Have you tried adding the following to your setup.cfg:

[files]
packages_root = src

Changed in pbr:
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
leducvin (leducvin) wrote :

The source code of our projects is also organized in projectslug/src/projectslug

i.e. there exists projectslug/src/projectslug/__init__.py

In projectslug/setup.cfg, I tried using (as suggested above):

[files]
packages_root = src
packages = projectslug

Strangely, this seems to work if I use "pip install -e projectslug" (setup in develop mode), however fails for a normal install.

Changed in pbr:
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.