specfile and support updates for rpm packaging
Details
Run on staging and dev systems as packaged. Build available on coprs: http://copr-fe.cloud.fedoraproject.org/coprs/tflink/taskotron/
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Source0 gives 404.
libtaskotron.spec | ||
---|---|---|
13 | I'm not sure if libtaskotron will be downloadable from git.fedorahosted.org/cgit/blockerbugs.git, but I doubt it. It gives 404 anyway. |
I would test it using fedora-review or manually, but I don't know how to get libtaskotron tarball. Do you have any scripts for building "libtaskotron-0.0.6.tar.gz"? Or do you use setup.py for that?
- initial code to support generic runner args to fix T127
- bumping version to 0.0.7-1
- undoing a runner change that was causing problems in tests
- changing all references of bodhi-id to bodhi_id so that it plays nice in jinja2 where '-' is an illegal char for identifiers
- bumping version on specfile to match code
sorry for the noise, the update was supposed to go to a new revision. I'll try to figure out how to undo
I would test it using fedora-review or manually, but I don't know how to get libtaskotron tarball. Do you have any scripts for building "libtaskotron-0.0.6.tar.gz"? Or do you use setup.py for that?
git archive --format=tar --prefix=libtaskotron-0.0.6/ <branch name> | gzip -c > libtaskotron-0.0.6.tar.gz
substituting your local branch name for <branch name>
- initial code to support generic runner args to fix T127
- bumping version to 0.0.7-1
- undoing a runner change that was causing problems in tests
- changing all references of bodhi-id to bodhi_id so that it plays nice in jinja2 where '-' is an illegal char for identifiers
- bumping version on specfile to match code
the extra commits still show up in arc but the code is all correct. I'll make sure that nothing extra gets pushed when the review is done
The spec file itself seems OK to me, with my limited packaging experience.
setup.py | ||
---|---|---|
24–30 | That doesn't seem like a very nice approach. In what way is it better than from . import libtaskotron setup(name='libtaskotron', version=libtaskotron.version), ... ? Of course the simplest way is to have the version hardcoded in setup.py, but I assume you want to use the version number also in libtaskotron itself (e.g. add --version option to runtask)? | |
38–39 | The url should read https://bitbucket.org/fedoraqa/libtaskotron. Is there any reason to keep the libtaskotron-demo repository around instead of deleting it? |
libtaskotron.spec | ||
---|---|---|
63 | Maybe this might be a bit unsafe? Not sure. |
libtaskotron.spec | ||
---|---|---|
63 | I can split it up into more than one line, if you'd prefer | |
setup.py | ||
24–30 | Hrm, I've just been doing setup.py files like this. Hadn't really thought about doing a simple libtaskotron.version instead, to be honest. I don't want the version number in both places, it makes for one more thing to change when bumping version and one more thing that can get out of sync | |
38–39 | no reason to keep libtaskotron-demo around that I'm aware of |
- making some small changes to url, version parsing and package files for review. adding resultsdb_api as BuildRequires for new tests.
setup.py | ||
---|---|---|
5 | A relative import would be safer here, I think: from . import libtaskotron otherwise, depending on sys.path, some other libtaskotron module can get loaded. I checked python interpreter and by default the local directory is at the top of the list both in standard and virtualenv environment. But with ipython, virtualenv was at the top instead. Users can have heavily modified sys.path. |
I think you should either use the relative import or the regexp parsing trick. Apart from that, the spec file is hopefully fine.
(Requesting changes to make Phab workflows happy.)
A relative import would be safer here, I think
Sure, but you can't do that outside the package:
Traceback (most recent call last): File "setup.py", line 2, in <module> from . import libtaskotron ValueError: Attempted relative import in non-package
I'm tempted to put the file reading code back since you are right about the possibility of PYTHONPATH affecting the installation
Sure, but you can't do that outside the package:
Ugh, right, my mistake.
Unless you want to modify sys.path and add __file__/libtaskotron as the first directory (not clean and nice at all), the regexp approach is probably better. Sorry for confusion.
- reverting setup.py back to using regex instead of import so we don't have to worry any sys.path effects
I'm not sure if libtaskotron will be downloadable from git.fedorahosted.org/cgit/blockerbugs.git, but I doubt it. It gives 404 anyway.