Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 573508

Summary: dev-python/flake8-quotes: Flake8 extension for checking quotes in python (new ebuild)
Product: Gentoo Linux Reporter: Erik Quaeghebeur <gentoo>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: IN_PROGRESS ---    
Severity: normal CC: hydrapolic, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 573206    
Attachments: flake8-quotes ebuild
metadata
ebuild
metadata
ebuild
ebuild

Description Erik Quaeghebeur 2016-01-31 16:22:33 UTC
Created attachment 424326 [details]
flake8-quotes ebuild

I've created an ebuild for suplemon (see bug #573206). It can use the Flake8 extension flake8-quotes. I here request an ebuild is added for that package. Please see the attachments for my proposal. I've put myself as proxy-maintainer for now, but perhaps ideally the flake8 maintainers take this one on as well.
Comment 1 Erik Quaeghebeur 2016-01-31 16:22:55 UTC
Created attachment 424328 [details]
metadata
Comment 2 Tomáš Mózes 2016-01-31 19:22:22 UTC
- does it fail with python 3.5?
- sort KEYWORDS
Comment 3 Tomáš Mózes 2016-01-31 19:25:20 UTC
Would be also nice to add tests, so running with FEATURES="test" will test the package.
Comment 4 Erik Quaeghebeur 2016-01-31 21:27:08 UTC
Created attachment 424368 [details]
ebuild
Comment 5 Erik Quaeghebeur 2016-01-31 21:28:23 UTC
(In reply to Tomáš Mózes from comment #2)
> - does it fail with python 3.5?

I haven't tested (and TBH, would prefer not to do that effort), but upstream only lists 2.7 and 3.4 as supported.
Comment 6 Erik Quaeghebeur 2016-01-31 21:30:14 UTC
(In reply to Tomáš Mózes from comment #3)
> Would be also nice to add tests, so running with FEATURES="test" will test
> the package.

Ack. I need some time to find a good example ebuild for that and learn a bit more ebuild writing. I may need to defer this to 'not right away', as a new working week is on its way and I will not have time next weekend.
Comment 7 Tomáš Mózes 2016-02-01 06:56:01 UTC
This package provides tests, so if you have Python 3.5 installed, you just run the ebuild with the currently supported Pythons (2.7, 3.4, 3.5) and that's it. Optionally you can test suplemon with it.

If you unpack the package (from github):
$ python setup.py build
running build
running build_py
creating build
creating build/lib
copying flake8_quotes.py -> build/lib
running egg_info
creating flake8_quotes.egg-info
writing requirements to flake8_quotes.egg-info/requires.txt
writing flake8_quotes.egg-info/PKG-INFO
writing top-level names to flake8_quotes.egg-info/top_level.txt
writing dependency_links to flake8_quotes.egg-info/dependency_links.txt
writing entry points to flake8_quotes.egg-info/entry_points.txt
writing manifest file 'flake8_quotes.egg-info/SOURCES.txt'
reading manifest file 'flake8_quotes.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'release.sh'
writing manifest file 'flake8_quotes.egg-info/SOURCES.txt'

If you want to test it:
$ python setup.py test
running test
running egg_info
writing requirements to flake8_quotes.egg-info/requires.txt
writing flake8_quotes.egg-info/PKG-INFO
writing top-level names to flake8_quotes.egg-info/top_level.txt
writing dependency_links to flake8_quotes.egg-info/dependency_links.txt
writing entry points to flake8_quotes.egg-info/entry_points.txt
reading manifest file 'flake8_quotes.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'release.sh'
writing manifest file 'flake8_quotes.egg-info/SOURCES.txt'
running build_ext
test_doubles (test.test_checks.DoublesTestChecks) ... ok
test_multiline_string (test.test_checks.DoublesTestChecks) ... ok
test_noqa_doubles (test.test_checks.DoublesTestChecks) ... ok
test_wrapped (test.test_checks.DoublesTestChecks) ... ok
test_multiline_string (test.test_checks.SinglesTestChecks) ... ok
test_noqa_singles (test.test_checks.SinglesTestChecks) ... ok
test_singles (test.test_checks.SinglesTestChecks) ... ok
test_wrapped (test.test_checks.SinglesTestChecks) ... ok
test_get_noqa_lines (test.test_checks.TestChecks) ... ok

----------------------------------------------------------------------
Ran 9 tests in 0.002s

OK
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2016-02-04 02:56:03 UTC
(In reply to Erik Quaeghebeur from comment #5)
> (In reply to Tomáš Mózes from comment #2)
> > - does it fail with python 3.5?
> 
> I haven't tested (and TBH, would prefer not to do that effort), but upstream
> only lists 2.7 and 3.4 as supported.

Erik relax. Adding the test phase in this case is a simple addition. No major effort.

See Tomas' 
 python setup.py test

now look in the typical ebuilds under dev-python, even dev-python/flake8 itself.
In fact yes. Simply drop in the testphase from it and it should all just work.

Also


DESCRIPTION="Flake8 extension for checking quotes in python" ->
DESCRIPTION="Extension flake8 for checking quotes in python"

would be better
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2016-02-04 02:58:40 UTC
I forgot, the metadata.xml file has a new face with the invocation of gelp67.
See https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers

and edit to match
Comment 10 Erik Quaeghebeur 2016-04-03 11:57:25 UTC
(In reply to Ian Delaney from comment #8)
>
> Also 
> 
> DESCRIPTION="Flake8 extension for checking quotes in python" ->
> DESCRIPTION="Extension flake8 for checking quotes in python"
> 
> would be better

Why? The second may confuse people into thinking that this extension is called flake8, but this is an extension to flake8. Perhaps you wanted

DESCRIPTION="Extension to flake8 for checking quotes in python"

?
Comment 11 Erik Quaeghebeur 2016-04-03 12:24:16 UTC
Created attachment 429552 [details]
metadata
Comment 12 Erik Quaeghebeur 2016-04-03 12:24:42 UTC
Created attachment 429554 [details]
ebuild
Comment 13 Erik Quaeghebeur 2016-04-03 12:31:38 UTC
Created attachment 429558 [details]
ebuild
Comment 14 Erik Quaeghebeur 2016-04-03 12:34:07 UTC
(In reply to Ian Delaney from comment #8)
>
> Erik relax. Adding the test phase in this case is a simple addition. No
> major effort.
> 
> See Tomas' 
>  python setup.py test
> 
> now look in the typical ebuilds under dev-python, even dev-python/flake8
> itself.
> In fact yes. Simply drop in the testphase from it and it should all just
> work.

Ok, I've added the test code and emerged it with FEATURES="test". (But I have neither 3.3 or 3.5 installed.)
Comment 15 Ian Delaney (RETIRED) gentoo-dev 2016-04-10 15:58:18 UTC
Erik Quaeghebeur
sorry for the delay, I had not checked emails bugs for some time. This is almost there.


1. Line 1 ought read  # Copyright 1999-2016 Gentoo Foundation
2. LICENSE="MIT-with-advertising"; IUSE="test"
In setup.py it has; license='MIT'  The MIT has a number of various forms of presentation. MIT is a commonly employed LICENSE.
If the IUSE test is set it need be actually used.

See here
DEPEND="${RDEPEND}
        dev-python/setuptools[${PYTHON_USEDEP}]
        >=dev-python/tox-2.3.1[${PYTHON_USEDEP}]
        <dev-python/tox-2.4.0[${PYTHON_USEDEP}]"

the DEPEND="${RDEPEND}
is not quite right and is a carry over from the past. It is true only if the package will not build without the packages set in RDEPEND and in most python packages of this type they are not required.
tox is used only for testing by upstream. It is not required or used in running the testsuite at all. Instead you need

DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
        test? ( ${RDEPEND} )"

install_requires=[ 'setuptools', ],
in fact states that setuptools is required @ runtime, a rarity. Adding setuptools to RDEPEND leave you with  DEPEND="test? ( ${RDEPEND} )"

Also you have not stipulated any version for this package. You normally do this in the text that supports or accompanies the attachment. 
https://pypi.python.org/pypi?%3Aaction=search&term=flake8-quotes&submit=search
lists 3 versions so in standard form I selected the latest version.; 0.1.2

On re-submission of a patch or ebuild I can add it to portage for you but under gentoo proxy maintainers project and or myself as supervising (proxy) developer.
 team python has long declared the list of packages over filled. I am going to presume you are content to be set as a proxied or user maintainer.
Comment 16 Erik Quaeghebeur 2016-06-26 21:07:22 UTC
Given that I have not been able to find or create the time to complete the ebuild, I think adding it to the tree with me as proxy-maintainer would not be a good idea. I apologize to Tomáš and Ian, who have helped me get this far with this ebuild.

Please close or leave open for someone else to pick up as appropriate.