Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517478 - dev-python/flask-cors - A Flask extension adding a decorator for CORS support
Summary: dev-python/flask-cors - A Flask extension adding a decorator for CORS support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Pavlos Ratis (RETIRED)
URL: https://pypi.python.org/pypi/Flask-Cors
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2014-07-19 04:49 UTC by W. Trevor King
Modified: 2014-09-09 04:07 UTC (History)
1 user (show)

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


Attachments
flask-cors-1.3.1.ebuild (flask-cors-1.3.1.ebuild,797 bytes, text/plain)
2014-07-19 04:49 UTC, W. Trevor King
Details

Note You need to log in before you can comment on or make changes to this bug.
Description W. Trevor King 2014-07-19 04:49:51 UTC
Created attachment 381018 [details]
flask-cors-1.3.1.ebuild

This is a dependency of docker-registry v0.6.9 [1], so I thought I'd write an ebuild to get it into the Portage tree.  Cribbed from 
flask-principal-0.4.0.ebuild, except I don't use variables when defining HOMEPAGE [2].  I haven't tested on all the listed Pythons yet, but I haven't found any mention of compatibility restrictions in the package docs.

[1]: https://github.com/dotcloud/docker-registry/blob/0.6.9/docker_registry/index.py#L4
[2]: http://devmanual.gentoo.org/ebuild-writing/variables/#ebuild-defined-variables
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2014-08-01 07:51:02 UTC
Works fine however dastergon why have you pointed this to you?

1. I'd go 
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
2. Re-check DEPEND="${RDEPEND}. It appears persistently and is generally wrong.
Shift it to 
test? ( ${RDEPEND}
          dev-python/nose[${PYTHON_USEDEP}] )"
and it becomes right.
3. nosetests || die "Testing failed with ${EPYTHON}"
works but so does
   esetup.py test in this case and is 'more' right. Also shorter

"I haven't tested on all the listed Pythons yet"
I did.

$ ls /mnt/gen2/TmpDir/portage/dev-python/flask-cors-1.3.1/work/Flask-Cors-1.3.1/docs/
conf.py  index.rst  Makefile

Why did you skip the doc build?
Comment 2 W. Trevor King 2014-08-01 17:10:17 UTC
(In reply to Ian Delaney from comment #1)
> Works fine however dastergon why have you pointed this to you?

I'd asked on #gentoo-containers if anyone wanted to pick this up (since it's used by docker-registry).  dastergon volunteered, and I expect that's why he assigned it to himself.  I think he's just been too busy to get to it yet ;).

> 1. I'd go 
> SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"

Works for me.

> 2. Re-check DEPEND="${RDEPEND}. It appears persistently and is generally
> wrong.
> Shift it to 
> test? ( ${RDEPEND}
>           dev-python/nose[${PYTHON_USEDEP}] )"
> and it becomes right.

Agreed.  Should I file a bug against flask-principal-0.4.0.ebuild too?

> 3. nosetests || die "Testing failed with ${EPYTHON}"
> works but so does
>    esetup.py test in this case and is 'more' right. Also shorter

Works for me.

> "I haven't tested on all the listed Pythons yet"
> I did.

Thanks :).

> $ ls
> /mnt/gen2/TmpDir/portage/dev-python/flask-cors-1.3.1/work/Flask-Cors-1.3.1/
> docs/
> conf.py  index.rst  Makefile
> 
> Why did you skip the doc build?

Because I was just copying from flask-principal-0.4.0.ebuild ? ;).  With 1.3.1, there are some compilation issues:

  /tmp/Flask-Cors-1.3.1/flask_cors.py:docstring of flask_cors.cross_origin:24: ERROR: Unexpected indentation.
  /tmp/Flask-Cors-1.3.1/docs/index.rst:7: ERROR: Undefined substitution referenced: "Build Status".

These seem to have been fixed before the current 1.6.1 (to be replaced by other errors ;).  I'll probably bump the email to 1.6.1 and try to get the doc build/install working when I have time, but feel free to beat me too it ;).
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2014-08-02 01:23:15 UTC
Mr. King. 

<I'd asked on #gentoo-containers if anyone wanted to pick this up (since it's used by docker-registry).  dastergon volunteered, and I expect that's why he assigned it to himself.  I think he's just been too busy to get to it yet ;).>

agreed.  What you didn't do was ask me in gentoo-python. Hint. I'm not so time poor.

<Agreed.  Should I file a bug against flask-principal-0.4.0.ebuild too?>

Nah. To be consistent you'd have to file a zillion others like it for pythonic packages.  Spare us all!  I'll just correct flask-principal in this instance.
   
<I'll probably bump the email to 1.6.1>

The email?????? Well this tells me there's a version 1.6.1, which seems to work fine. Unless you have a good reason I'd suggest switching this whole bug to flask-cors-1.6.1

<and try to get the doc build/install working when I have time, but feel free to beat me too it ;).>

Hrmm; I could NOT possibly steal your thunder on this.  (Hint, the code to do so is present in zillions of other like packages, though there are variations on the theme)

I suggest since you have an irc presence you extend it to the python channel and finalise arrangements there. I got the time if you got the patience.
Comment 4 W. Trevor King 2014-08-07 05:35:40 UTC
(In reply to W. Trevor King from comment #2)
> With 1.3.1, there are some compilation issues:
> 
>   /tmp/Flask-Cors-1.3.1/flask_cors.py:docstring of
> flask_cors.cross_origin:24: ERROR: Unexpected indentation.
>   /tmp/Flask-Cors-1.3.1/docs/index.rst:7: ERROR: Undefined substitution
> referenced: "Build Status".
> 
> These seem to have been fixed before the current 1.6.1 (to be replaced by
> other errors ;).  I'll probably bump the email to 1.6.1 and try to get the
> doc build/install working when I have time, but feel free to beat me too it
> ;).

I just submitted fixes to the 1.6.1 doc compilation issues upstream [1].  I'll give them a bit to see if we can get a 1.6.2, otherwise I'll add the patches and a 1.6.1 ebuild to my ‘wtk’ overlay.

[1]: https://github.com/wcdolphin/flask-cors/pull/44
Comment 5 W. Trevor King 2014-08-30 16:38:53 UTC
(In reply to W. Trevor King from comment #4)
> I just submitted fixes to the 1.6.1 doc compilation issues upstream [1]. 
> I'll give them a bit to see if we can get a 1.6.2, otherwise I'll add the
> patches and a 1.6.1 ebuild to my ‘wtk’ overlay.

After a few rounds of doc and packaging fixes, I've got a 1.8.0 ebuild in my ‘wtk’ overlay with the features requested here [1].

[1]: http://git.tremily.us/?p=wtk-overlay.git;a=commit;h=1fa8b8fd1097460603f3bc025d94bc623c18531b
Comment 6 W. Trevor King 2014-09-09 04:07:25 UTC
Ian added the ebuild from my overlay to the Portage tree [1].

[1]: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/flask-cors/