Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541608 - =media-gfx/uniconvw-1.1.5
Summary: =media-gfx/uniconvw-1.1.5
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2015-03-14
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-02-28 09:35 UTC by Ian Delaney (RETIRED)
Modified: 2015-05-27 12:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
diff -u patch uniconvw ebuilds (uniconvw.patch,1.20 KB, patch)
2015-02-28 09:35 UTC, Ian Delaney (RETIRED)
Details | Diff
diff -u patch (uniconvw.patch,1.16 KB, patch)
2015-02-28 15:52 UTC, Ian Delaney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Delaney (RETIRED) gentoo-dev 2015-02-28 09:35:17 UTC
Created attachment 397644 [details, diff]
diff -u patch uniconvw ebuilds

uniconvw-1.1.5.ebuild inherit distutils and requires conversion to the new eclass and EAPI upgrade. Patches to be commited if there is no response in 2 weeks."

eutils is inherited in the intial ebuild but I don't see it's actually used. 
I might be missing it
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2015-02-28 10:22:03 UTC
Comment on attachment 397644 [details, diff]
diff -u patch uniconvw ebuilds

>+pkg_setup() {
>+	python-single-r1_pkg_setup
>+}
>+

Why this? it should all be handled by the distutils-r1 eclass

> src_prepare() {
> 	sed -i \
> 		-e "s/'GNU_GPL_v2', 'GNU_LGPL_v2', 'COPYRIGHTS',//" \
> 		setup.py || die
> 
>-	distutils_src_prepare
>+	distutils-r1_src_prepare
> }

Such things should be done via python_prepare_all().
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2015-02-28 14:33:40 UTC

(In reply to Justin Lecher from comment #1)
> Comment on attachment 397644 [details, diff] [details, diff]
> diff -u patch uniconvw ebuilds
> 
> >+pkg_setup() {
> >+	python-single-r1_pkg_setup
> >+}
> >+
> 

https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#distutils.eclass conversion

> Why this? it should all be handled by the distutils-r1 eclass
> 
> > src_prepare() {
> > 	sed -i \
> > 		-e "s/'GNU_GPL_v2', 'GNU_LGPL_v2', 'COPYRIGHTS',//" \
> > 		setup.py || die
> > 
> >-	distutils_src_prepare
> >+	distutils-r1_src_prepare
> > }
> 
> Such things should be done via python_prepare_all().


Frankly I fluctuate at whim.  By use of DISTUTILS_SINGLE_IMPL=1 you're effectively cutting out the relevance of python_prepare_all since whatever is done in python_prepare_all cannot be distinguished from python_prepare. However, python_prepare_all works perfectly.  distutils-r1_src_prepare simply calls them anyway.  

The DISTUTILS_SINGLE_IMPL=1 is a relatively new addition.  Without its presence I would have done it all as you expected.  These work also.  If you prefer to have it done this way, just take out DISTUTILS_SINGLE_IMPL=1 and that leaves that 'usual' way.  The use of DISTUTILS_SINGLE_IMPL=1 is based upon the fact that all of these conversions are old packages that are py2 only.  While py3 existed at that point in time, its support was rudimentary at best.

Not so much shades of grey as the choice of ways to skin the cat. (Poor puss).
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2015-02-28 14:49:11 UTC
(In reply to Ian Delaney from comment #2)
> 
> (In reply to Justin Lecher from comment #1)
> > Comment on attachment 397644 [details, diff] [details, diff] [details, diff]
> > diff -u patch uniconvw ebuilds
> > 
> > >+pkg_setup() {
> > >+	python-single-r1_pkg_setup
> > >+}
> > >+
> > 
> 
> https://wiki.gentoo.org/wiki/Project:Python/Python.
> eclass_conversion#distutils.eclass conversion
> 

for distutils -> distutils-r1 this is not needed.

> > Why this? it should all be handled by the distutils-r1 eclass
> > 
> > > src_prepare() {
> > > 	sed -i \
> > > 		-e "s/'GNU_GPL_v2', 'GNU_LGPL_v2', 'COPYRIGHTS',//" \
> > > 		setup.py || die
> > > 
> > >-	distutils_src_prepare
> > >+	distutils-r1_src_prepare
> > > }
> > 
> > Such things should be done via python_prepare_all().
> 
> 
> Frankly I fluctuate at whim.  By use of DISTUTILS_SINGLE_IMPL=1 you're
> effectively cutting out the relevance of python_prepare_all since whatever
> is done in python_prepare_all cannot be distinguished from python_prepare.
> However, python_prepare_all works perfectly.  distutils-r1_src_prepare
> simply calls them anyway.  
> 
> The DISTUTILS_SINGLE_IMPL=1 is a relatively new addition.  Without its
> presence I would have done it all as you expected.  These work also.  If you
> prefer to have it done this way, just take out DISTUTILS_SINGLE_IMPL=1 and
> that leaves that 'usual' way.  The use of DISTUTILS_SINGLE_IMPL=1 is based
> upon the fact that all of these conversions are old packages that are py2
> only.  While py3 existed at that point in time, its support was rudimentary
> at best.

If python_prepare_all works then use it. This would follow the general pattern and correct usage of the eclass API.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2015-02-28 15:52:58 UTC
Created attachment 397678 [details, diff]
diff -u patch

the usual form.  Just works. This time we go for the common pattern.

for distutils -> distutils-r1 this is not needed.

Actually it is.  From the eclass;

# Note that inheriting python-single-r1 will cause pkg_setup()
# to be exported. It must be run in order for the eclass functions
# to function properly.

You have eselect python set to a py3 and the ebuild will fail using the wrong python.  pkg_setup by python-single-r1 selects py2 set in PYTHON_COMPAT.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2015-02-28 17:02:21 UTC
(In reply to Ian Delaney from comment #4)
> Actually it is.  From the eclass;
> 
> # Note that inheriting python-single-r1 will cause pkg_setup()
> # to be exported. It must be run in order for the eclass functions
> # to function properly.
> 
> You have eselect python set to a py3 and the ebuild will fail using the
> wrong python.  pkg_setup by python-single-r1 selects py2 set in
> PYTHON_COMPAT.

You are absolutely right, it needs to be called. Sorry for that confusion.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-05-27 12:35:35 UTC
The package is gone.