Closed adelton closed 6 years ago
Does setting the Hmm... it appears not.--name
flag not work (https://stackoverflow.com/questions/7123928/setting-the-rpm-package-name-in-bdist-rpm)?
Perhaps the --spec-only
trick from the link above with a light dose of sed?
For the record, the --name
causes
$ python setup.py bdist_rpm --name python-requests-gssapi --source-only --dist-dir "." --build-requires=python-setuptools
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --name not recognized
on Fedora 27.
Approach with patching setup.py
in the Makefile
seems to work -> b738b4aa083e0dc3b85ef816cbe5cdf62a50b545.
hmm... I could probably live with patching setup.py
@frozencemetery WDYT?
I'm not entirely clear on what changing name
will break, and it sounds like you have reservations with that approach as well. How bad is it actually?
I think I'd prefer using sed
to patch
, if we go that route.
changing name
permanently changes the package name when installed via pip, etc.
@DirectXMan12, is there a way to have the rpm package name prefixed with python-
while retaining the name as viewed by the python stack without the prefix?
not that I know of from the python end, unfortunately, without a sed-like trick.
A further question: why did the file mode on setup.py change?
To be clear, with no change to file mode, and using the sed approach instead of patch, I'm happy to take this change.
The permission change was a bug.
I've now changed the Makefile to use sed. -> 7137aebdbc3118ed0c2f7ad64f67a75524e23260.
https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm
I understand changing the
name
insetup.py
is not the right way to do it but I did not find a mechanism to override thename
inbdist_rpm
invocation.Providing here as an example of how the package can be easily buildable in copr: https://copr.fedorainfracloud.org/coprs/adelton/custodia/build/701836/