Commit Graph

11 Commits

Author SHA1 Message Date
Clark Boylan b10c2f4003 Fix bindep on Arch with packaging>=22.0
packaging 22.0 removed the LegacyVersion object which was the fallback
when an invalid version was found. Now when an invalid version is found
packaging raises and exception. This appears to be a problem for rolling
release distros like Arch and Manjaro as they don't have versions.

To fix this we catch the exception and set our object value to None.
This will cause us to error later should we actually need the version
for some reason. When we don't need it as with Arch/Manjaro we continue
along just fine.

Change-Id: Ic9ec6a3a492a7f95cf9d2865f88d79c6c5de796c
2023-01-25 16:10:13 -08:00
Clark Boylan 697af0b17a Use nox
This illustrates the use of nox in a simpler project. It can build docs,
run linters, and execute unittests simply and effectively.

Note we pin the packaging package as newer versions have changed
behavior on rolling release distros that don't have proper version. This
is necessary to fix gating. The followup change fixes it properly.

Change-Id: I795e4d73f60d90b0f027df43a80ebda773ee9194
2023-01-25 16:09:12 -08:00
Erik Berg 186f6e4035 Fix bindep testing with distro 1.7.0 and greater
The 1.7.0 release of distro moves the source code around [0] which
requires us to update our monkey patching of distro to make tests work.
Because distro 1.7.0 does not support python < 3.6 we update bindep's
testing to accomodate both old and new distro to enable python 2.7 and
3.5 testing.

[0] 4d76bd160f

Change-Id: I6cc3bedaa9753dc86d6560d32961b5a22cf3a36e
2022-04-11 12:19:56 -07:00
Clark Boylan 0bd79b1d5d Add old python packaging pin
The packaging package doesn't support python3.5 or older anymore. Bindep
is still occasionally used on systems without newer python. Add an
environment marker to our requirements to install older packaging on
those systems.

Change-Id: I28949b0bb7d4978fc7f71109d0c65b9b76d6563f
2021-10-19 16:09:02 -07:00
Jeremy Stanley d0fba55d50 Require packaging
Apparently distutils.version.LooseVersion does not supply a version
attribute in newer Python stdlib. The code we have already prefers
packaging.version.parse over it anyway if packaging is installed, so
declare it as an actual requirement. Clean up the old distutils
alternative now that it should no longer be called.

Change-Id: I9409f2b0e076e5def3fffb1149665df71c0c5508
2021-10-02 12:46:56 +00:00
Clark Boylan 313cccff27 Use the distro package to determine distro
Some distros don't have lsb_release and some aren't even linuxes. Lets
work to support them by using the python distro package which has a
consistent api to getting the distro id, codename, and version info that
we need.

This does its best to be backward compatible by adding atoms for the
os-release reported name and the lsb_release reported name when they
differ on distros; however, it is likely that my survey was incomplete
and there may be other non matching distros. (For some reason it seems
like this is super common with rpm based distros...).

Note that the test for a missing lsb_release has been removed since that
is not the distro package's responsibility and it has multiple
fallbacks.

Change-Id: I891f5d21accb3fbf6d56bd6b0c2ebc2601682442
2018-06-22 13:52:09 -07:00
Rodolfo Alonso Hernandez 56f874da62 Update 'pbr' version requirements
Updated 'pbr' library version in requirements to >=2.0.0
to match project 'requirements' version.

Change-Id: I44f3973fcc94d2e35bff39f6219674e59ce8f8fd
2017-03-31 09:14:31 +01:00
Paul Belanger 891894266f Bump lower cap of PBR to 1.3
We currently pin to an older version of PBR, bump this to 1.3 (picked
from nodepool) to allow us to start using newer versions.

Change-Id: I475c9c894e61e8bae60305a2f2f1a462f483f1b4
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-03-21 21:16:59 -04:00
Jeremy Stanley 0407bb62a3 Sync with openstack-dev/cookiecutter
Update boilerplate content, modernize for more recent PBR
advancements, and get tests and style checks working.

Change-Id: I86b6a171d2d81dd870f092542d2f4569a6772fac
2015-04-03 19:49:22 +00:00
Robert Collins f06270eab3 Add first cut parser. 2013-06-10 11:19:25 +12:00
Robert Collins cb397d5f3e Initial project docs and framework. 2013-06-09 21:24:01 +12:00