Open cookie33 opened 7 years ago
It is able to create an rpm. Just tested:
rods$ python setup.py bdist_rpm
running bdist_rpm
running egg_info
creating src/eudat.accounting.client.egg-info
writing requirements to src/eudat.accounting.client.egg-info/requires.txt
writing src/eudat.accounting.client.egg-info/PKG-INFO
...
moving build/bdist.linux-x86_64/rpm/SRPMS/eudat.accounting.client-1.0.1.dev0-1.src.rpm -> dist
moving build/bdist.linux-x86_64/rpm/RPMS/noarch/eudat.accounting.client-1.0.1.dev0-1.noarch.rpm -> dist
After installation it is:
# rpm -qa | grep eudat
eudat.accounting.client-1.0.1.dev0-1.noarch
...
The name of the package is strange with the dots
The rpm contains:
# rpm -ql eudat.accounting.client
/usr/bin/addRecord
/usr/bin/iRODScollector
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6-nspkg.pth
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/PKG-INFO
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/SOURCES.txt
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/dependency_links.txt
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/entry_points.txt
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/namespace_packages.txt
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/not-zip-safe
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/requires.txt
/usr/lib/python2.6/site-packages/eudat.accounting.client-1.0.1.dev0-py2.6.egg-info/top_level.txt
/usr/lib/python2.6/site-packages/eudat/accounting/client/__init__.py
/usr/lib/python2.6/site-packages/eudat/accounting/client/__init__.pyc
/usr/lib/python2.6/site-packages/eudat/accounting/client/__init__.pyo
/usr/lib/python2.6/site-packages/eudat/accounting/client/__main__.py
/usr/lib/python2.6/site-packages/eudat/accounting/client/__main__.pyc
/usr/lib/python2.6/site-packages/eudat/accounting/client/__main__.pyo
/usr/lib/python2.6/site-packages/eudat/accounting/client/iRODScollector.py
/usr/lib/python2.6/site-packages/eudat/accounting/client/iRODScollector.pyc
/usr/lib/python2.6/site-packages/eudat/accounting/client/iRODScollector.pyo
/usr/lib/python2.6/site-packages/eudat/accounting/client/utils.py
/usr/lib/python2.6/site-packages/eudat/accounting/client/utils.pyc
/usr/lib/python2.6/site-packages/eudat/accounting/client/utils.pyo
It does NOT supply the template in the rpm..
The program is able to start:
rods$ iRODScollector -h
usage: iRODScollector [-h] [--version] [-c CONFIGPATH] [-k KEY] [-T TYPE]
[-m MEASURE_TIME] [-C COMMENT] [-t] [-v]
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-c CONFIGPATH, --configpath CONFIGPATH
path to configuration file. Default:
"./irodscollector.cfg" (in the current working
directory)
-k KEY, --key KEY key used to refer to the record. If not set the
accounting server will create the key. Specifying an
existing key will overwrite the existing record.
Default: "" - not set
-T TYPE, --type TYPE type of the resource accounted. Default: storage
-m MEASURE_TIME, --measure_time MEASURE_TIME
measurement time of the accounting record if different
from the current time. Default: "" - not set
-C COMMENT, --comment COMMENT
arbitrary comment (goes into the meta dictionary).
Default: "" - not set
-t, --test Dry run. Don't push data to server - run only locally
Default: off
-v, --verbose return the key of the accounting record created.
Default: off
Hi Robert, thanks for your feedback and sorry for the delay in my response. Do I understand things correctly that you were able to solve most of this issue yourself? And that the only thing left is the missing configuration template?
If so, did you create the rpm from a git clone or an export of the code base? I know that at least when creating an egg, everything that's under version control is included per default. Not sure for the rpm though. And I know that I have included it in the manifest file.
If all fails: you are supposed to adjust the config file anyway. The template is only there to help you to get started. You could just as well copy it from the documentation and take it from there.
Feel free to ping me if you have further questions. I'm getting back into "DPMT mode" finally ... (on to the other issue now)
Hi,
I think I did a git clone and than build the client rpm and installed it. It works on python 2.6 on Centos 6.
But the name of the rpm is weird with all the dots (not very nix like):
eudat.accounting.client-1.0.1.dev0-1.noarch
The configuration missing was the other thing next to the weird rpm name.
Well, the dots result from the fact that I make use of namespace packages (nested in this case even). In parts of the Python community - in particular in larger community projects - this is quite common.
Don't know whether there is an option to name the resulting rpm differently in the end. I don't live in that world ;-)
Anyone around who knows how we could deal with that? Maybe by specifying the 'distribution_name' as explained here: https://docs.python.org/2.0/dist/creating-rpms.html Same for the missing sample config file.
Hi,
It creates some files. Where does it put them? It only states bin/. Which bin directory where?
And can I create an rpm using
We do NOT want to use pip. And no docker or virtualenv. It has to run on a machine without doing anything which is NOT out of the box supported.
We use Centos and python 2.6. Is that supported?