PBR

'exclude' packages option in files section of setup.cfg

Bug #1589766 reported by Yusuke Iwase
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
PBR
Confirmed
Wishlist
Unassigned

Bug Description

With 'setuptools.find_packages', we can specify the package names to exclude.
https://setuptools.readthedocs.io/en/latest/setuptools.html#using-find-packages

For example, we can exclude the test files:
  'find_packages(exclude=["*.tests", "*.tests.*"])'

With pbr, how to do this?
If not implemented, how about 'exclude' packages option?

Revision history for this message
Wes Turner (wes-turner) wrote :

See also: "ENH: also exclude files from bdist and bdist_wheel packages" https://bugs.launchpad.net/pbr/+bug/1607057

Revision history for this message
Wes Turner (wes-turner) wrote :
Revision history for this message
Yusuke Iwase (iwase-yusuke0) wrote :

Thank you for your reply!

But, I want to exclude the test files when executing 'python setup.py install'
or 'pip install .' command.

The documents you pointed explain the procedures when creating a source
distribution package, I think.

And, as you said, by using 'setuptools.find_packages' in setup.py without pbr,
I could exclude the test files, but I couldn't with pbr enabled.

The following seems to find packages to install and does not provide 'exclude'
options.
 http://git.openstack.org/cgit/openstack-dev/pbr/tree/pbr/find_package.py#n21

Revision history for this message
Spyros Trigazis (strigazi) wrote :

We must be able to exclude packages. exclude in find_packages is very standard, we need to support this option.

Revision history for this message
Gaetan Semet (gaetan-xeberon) wrote :

Hello. I support this feature. Today, we can use MANIFEST.in to exclude some files (ex: test files) from the source distribution package. This does not impact binary distribution packages and wheel.

Revision history for this message
Yusuke Iwase (iwase-yusuke0) wrote :

Great! Thanks! Can I use it now? (required upstream of oslo.config?)

Ben Nemec (bnemec)
Changed in pbr:
status: New → Confirmed
importance: Undecided → Wishlist
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.