equal
deleted
inserted
replaced
1 #!/usr/bin/env python3 |
1 #!/usr/bin/env python3 |
2 |
2 |
3 from distutils.core import setup |
3 from distutils.core import setup |
4 from distutils.command.bdist_rpm import bdist_rpm |
|
5 import sys |
|
6 |
|
7 |
|
8 class my_bdist_rpm(bdist_rpm): |
|
9 def __init__(self, *args, **kwargs): |
|
10 bdist_rpm.__init__(self, *args, **kwargs) |
|
11 self._alter_name() |
|
12 |
|
13 def _alter_name(self): |
|
14 """Prepend "python-" or "python3-" in package name.""" |
|
15 if sys.version_info.major == 3: |
|
16 prefix = 'python3-' |
|
17 else: |
|
18 prefix = 'python-' |
|
19 self.distribution.metadata.name = prefix + self.distribution.metadata.name |
|
20 |
4 |
21 |
5 |
22 setup( |
6 setup( |
23 name='pycolib', |
7 name='pycolib', |
24 version='0.0.1', |
8 version='0.0.2', |
25 description='Library of small auxiliary modules', |
9 description='Library of small auxiliary modules', |
26 author='Radek Brich', |
10 author='Radek Brich', |
27 author_email='radek.brich@devl.cz', |
11 author_email='radek.brich@devl.cz', |
28 url='http://hg.devl.cz/pycolib', |
12 url='http://hg.devl.cz/pycolib', |
29 packages=['pycolib'], |
13 packages=['pycolib'], |
30 cmdclass={'bdist_rpm': my_bdist_rpm}, |
|
31 ) |
14 ) |
32 |
15 |