On 19. 04. 20 16:39, Jerry James wrote:
On Sun, Apr 19, 2020 at 2:11 AM Miro Hrončok mhroncok@redhat.com wrote:
Correction, this is valid:
https://www.python.org/dev/peps/pep-0440/#local-version-identifiers
But in this package case, we don't want version 0, so valid, but wrong.
Followup on the generator problem:
https://github.com/rpm-software-management/rpm/issues/1183
- the traceback should say: Cannot process Python package version: 0+unknown
- the build should abort on errors
- the version is actually valid
Thanks for the detective work, Miro. I wish this upstream would just release a new version.
Anyway, now that I know what the immediate problem is, I'll try to work around it. Regards,
In this particular case the version is trying to be read from git, I recommend using %autosetup -S git and creating a %{version} tag in %prep.
I'll send a PR shortly.
On 19. 04. 20 17:09, Miro Hrončok wrote:
Anyway, now that I know what the immediate problem is, I'll try to work around it. Regards,
In this particular case the version is trying to be read from git, I recommend using %autosetup -S git and creating a %{version} tag in %prep.
I'll send a PR shortly.
OK. I've tired the usual:
%prep ... git commit -q -a -m "rpmbuild %prep" --author "%{__scm_author}" git tag -a -m '%{version} from rpmbuild' %{version}
But it is not that simple. The "versioneer" thing used here tries to read and parse (or execute?) the nb2plots/_version.py file. The file has gitattributes variables in it and git(hub) substitutes those with real values when the git archive tarball is created. Hence any git-like voodoo in prep doesn't really change that :(
I am afraid that sedding/patching the file is the only sane way forward. Replacing
git_refnames = " (HEAD -> master)"
with
git_refnames = " (tag: 0.6)"
gets the job done.
Finishing the commit message...
On 19. 04. 20 17:49, Miro Hrončok wrote:
On 19. 04. 20 17:09, Miro Hrončok wrote:
Anyway, now that I know what the immediate problem is, I'll try to work around it. Regards,
I'll send a PR shortly.
Finishing the commit message...
https://src.fedoraproject.org/rpms/python-nb2plots/pull-request/2
python-devel@lists.fedoraproject.org