On 9.10.2018 22:51, Zbigniew Jędrzejewski-Szmek wrote:
On Tue, Sep 18, 2018 at 03:14:41PM +0200, Miro Hrončok wrote:
Is anyone willing to look into automating this? Write a spec
depython2izer?
Hi,
I wrote something that mostly seems to work:
https://pagure.io/pyrenamer/blob/master/f/depython2ize.py
../pyrenamer/depython2ize.py -b -d python-alchimia python-gzipstream \
python-ivi python-pdfkit python-simpleparse python-walkdir \
python-XStatic-Jasmine python-yourls ...
If does:
- removing python2- and python- BRs
yes
- removing %package -n python2 and it's metadata, description & %files
yes
- removing all %py2_build, %py2_install or their older manual variants
yes
- removing python2 tests from %check
yes
- (sometimes) removing %py3dir or python3 dir pushd/popd dance
yes (by default, can be disabled with a switch)
- (sometimes) removing with_python3 conditionals as they make no sense
no
The workflow is to first calls it with just -bd for review, and then with -bwn
to actually commit.
I tested it for packages from $(bugzilla query --blocked=1625773 -s NEW).
For the ones that are called python-* it seems to work, and quite a lot
of them even build fine. Sometimes manual fixups will be necessary (e.g.
when the py2 directories or files are referenced from %build in non-trivial
ways).
For packages with generic names it doesn't work because python2 subpackage
detection is broken. Should be relatively easy to fix. I'll work on that
tomorrow, so please just ignore them for now.
PTAL. Let me know what bits are missing or buggy.
python-XStatic-* packages have a lot of remaining mvs with
python2_sitelib involved. e.g. python-XStatic-Jasmine,
python-XStatic-Font-Awesome.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org