Commit Graph

25 Commits

Author SHA1 Message Date
Tony Breeds 3edbe8484c Add python2 and python3 return values
The generic translation rules
 def openstack_prefix_tr(mod):
 def rdo_horizon_plugins_tr(mod):
 def suse_horizon_plugins_tr(mod):

Only have return values for pyvers=py, Update the rules to return the
same pkg regardless of pyversion.

This way:
for pyver in py py2 py3 ; do
   pymod2pkg --dist xx --pyver $pyver Tempest
done

returns openstack-tempest for all python versions

Change-Id: I73a49916e2b2898cb31d8cfd68e25b94d39b1934
2022-07-27 15:50:18 +10:00
Sean McGinnis f8b81c71f9
Drop use of unittest2
unittest2 was needed for compatibility with python <= 2.6, so we have
not needed this for quite some time now. See unittest2 note on:

https://docs.python.org/2.7/library/unittest.html

This drops the use of unittest2 in favor of the standard unittest
package.

Change-Id: I46ec317f0ee43ff95d8af1aa68b8d0596dc4dd35
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-12 02:31:47 -06:00
Javier Pena 7f6c72d97b Fix some upstream mappings
- openstack-placement maps to placement in the openstack repos
- openstacksdk now maps to the same name

Change-Id: I9f5dd0300c6fb9eb21784bc98971a06294826273
2019-10-11 11:04:48 +02:00
Thomas Bechtold 079347dd37 Translate tempest to openstack-tempest
We currently have Tempest (uppercase T) but the pypi name is really
tempest (lowercase t).
So support both (upper/lower case) for now.

Change-Id: I0b74f9f79a8610d23912334310f148f2915f3f4d
2019-09-03 09:57:05 +02:00
Thomas Bechtold bda6c851c9 Add openstack-placement rule for SUSE and RDO
The pypi name for OpenStack Placement is openstack-placement. This
name must not be translated (so the result is openstack-placement).

Change-Id: Ic47a0a5b66f23d0fb37364d79e7a61a9e6dcca8a
2019-08-26 14:39:11 +02:00
Thomas Bechtold 389833a2fd Add aodh and barbican rule for SUSE
aodh and barbican should translate to openstack-barbican on SUSE.

Change-Id: I6ea7380b7950c8b2da172f52ebc9a68cc094f554
2019-08-19 16:12:35 +02:00
Thomas Bechtold b62ccc6b09 Add RDO/SUSE rule for heat-agents
On both platforms, heat-agents translates to openstack-heat-agents.

Change-Id: If01f7e4a5c7ba65beaae78e1b7b7123f61118cf3
2019-03-04 10:27:18 +01:00
Dirk Mueller d8c52f2621 Tighten the horizon plugin rule a bit more
There was another corner case not found by unit tests. Add
testcase and skip re-expanding the -ui/-dashboard renaming
for the python- subpackage.

Change-Id: Ifa08bc8da8524e15e90bafbb40d6a3ca1acbb615
2019-01-02 22:13:04 +01:00
Dirk Mueller adefeddaa5 Fix regression in neutron-fwaas-dashboard mapping
The change https://review.openstack.org/#/c/622228/ broke
the mapping for neutron-fwaas dashboard. The change introduced
there did not match "neutron-fwaas" because of only matching
for a single word, not a word combination connected by "-".

Change-Id: I9b427b21dfede77935bcfb9559a9afde8957428e
2019-01-02 15:39:03 +01:00
Sumit Jamgade 6c35e3ce03 added regex rule for horizon dashboard packages for suse
- corresponding tests
- removed the existing rules for *-dashboard for suse as they covered
under regex rules

Change-Id: I99135df7173cd52d0088b276fb0dddca3cb6ae9b
2018-12-10 12:34:05 +01:00
Thomas Bechtold 9eb8f76e64 Change default translation for py2 in RDO
RDO does not have python2-foo packages for everything but python2-foo
packages usually Provides python-foo packages. So change the default
translation for python2 packages to python-foo (instead of
python2-foo).

Change-Id: I51cacf2de8fd108b224f442bd760fa8ba43daec9
2017-10-13 08:22:45 +02:00
Thomas Bechtold b06c67d197 Add mapping for unversioned names
On SUSE, the main package starts usually with python- (eg. python-Babel)
and then the py2/py3 packages with python2- and python3- .
To be able to use pymod2pkg for the singlespec convertion, also an
unversioned name is needed.

Change-Id: I3eed46af4ac8c937222c927516bd1a338200d6f2
2017-09-13 09:30:11 +02:00
Dirk Mueller 115f0a2a8a Add SUSE exception for python-devel
pymod2pkg('devel') should resolve to python-devel, python3-devel

Change-Id: I614957f956cb11b6f476e8a03d6c3c959e3a10a3
2017-09-12 13:43:32 -06:00
Javier Pena 2f6b98677f Add support for python3 packages
Python3 support is added by:

- Having a new command-line option (--pyver) that allows us to select
  with Python versions we need (by default only Python 2).
- An updated module2package function that returns the required package
  name(s).
- Updated rules to return both python2 and python3 package names.

Change-Id: I85009d1671d38773ab49865f9acc3e3c4802b542
2017-09-12 09:52:57 +02:00
Chandan Kumar e4e6fa1486 Added name conversion support for tempest-plugin
* <project>-tempest-plugin should be translated to
  python-<project>-tests-tempest.

Change-Id: Ib27208b55dfb7ac3c64f587aca541528d0305a1f
2017-09-11 15:45:13 +05:30
Chuck Short 02a066a6d7 Add support for Ubuntu
Add support to translate package names to what
is in the Ubuntu Archive.

Change-Id: Ie64ecaf1dc7dde9d51e6085215aba56ca3ff3fdd
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2016-12-14 08:43:19 -05:00
Javier Pena 58a12b93a3 Add mapping for OpenStack project names
This patch adds a new OPENSTACK_UPSTREAM_PKG_MAP map to map PyPi
names to OpenStack project names, as they are not always the same,
and a --upstream command-line argument to pymod2pkg.

Change-Id: I4eda55b4d7b2dcc8df28912913b876e2c40289b3
2016-09-07 15:49:52 +02:00
Jenkins a7d0bee672 Merge "Remove aodh/gnocchiclient remapping" 2016-09-05 10:59:33 +00:00
Dirk Mueller 873030f1e9 Remove aodh/gnocchiclient remapping
(python-)aodhclient is, unlike all the other openstack clients,
actually registered as aodhclient in pypi. Same for gnocchiclient.

Change-Id: If8b9e99d8719a46de3aca72be702a35159b5ba6e
2016-09-03 08:52:56 +02:00
Thomas Bechtold 01c70de43d pypi name is Tempest, not tempest
For SUSE and RDO, Tempest should be translated to openstack-tempest.

Change-Id: Idd2b78b1932800a40c7367e2d10155570e799db0
2016-09-02 07:49:40 +02:00
Dirk Mueller 0d92819787 Add more exceptions for SUSE case
all python-*client's are not getting an extra python- prefix

Change-Id: Ic4da525a2efca118570f150cdd1e37f03c7f7376
2016-07-15 14:01:42 +02:00
Haikel Guemar 4569ec9959 Add RDO horizon plugins mapping
Change-Id: I5963eb021fa751703240dc5b093309d9ed8f8fbe
2016-06-30 11:47:23 +02:00
Haikel Guemar fb5b000ae9 Add a RegexRule TranslationRule class
Allow to use regular expressions to match module name

Change-Id: I2486ce54b063cf92a77c2b62bb953f42f7426e47
2016-06-30 11:43:40 +02:00
Thomas Bechtold 479ef07c9a Add tox.ini to be able to run tests
In addition to the tox.ini, there are some more changes
to enable testing:

- require flake8 in test-requirements.txt
- fix current pep8 errors
- add .gitignore including the .tox dir

Change-Id: I4cf9d8fc1c9a2eb4929fddb4a18a7db87481017c
2015-11-10 14:56:15 +01:00
Jakub Ruzicka c9db5c3622 Initial import
Change-Id: Iae6954b555e948c87bde79781ec07bd8c24f9554
2015-11-02 09:10:12 +01:00