Bug 1163974

Summary: build python-flask-assets for epel7
Product: [Fedora] Fedora EPEL Reporter: Tim Flink <tflink>
Component: python-flask-assetsAssignee: Praveen Kumar <kumarpraveen.nitdgp>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: dcallagh, kumarpraveen.nitdgp, metherid, pj.pandit, prkumar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-20 04:45:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 723924    
Bug Blocks:    
Attachments:
Description Flags
patch for python-flask-assets specfile to work in epel7
none
patch to remove flask-script requirements and fix test skipping
none
patch to back out much of the API changes required for python-webassets-0.10
none
correct patch to remove flask-script requirements and fix test skipping none

Description Tim Flink 2014-11-13 20:32:56 UTC
There is currently no build for python-flask-asets in epel7 nor a branch in pkggit.

Please do a build for epel7, ideally updated to the latest 0.10

Comment 1 Praveen Kumar 2014-11-17 05:58:34 UTC
I request for epel7 branch, once scm is done will update package source and build it for all branches.

Comment 2 Fedora Update System 2014-12-11 07:43:28 UTC
python-flask-assets-0.10-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/python-flask-assets-0.10-1.fc21

Comment 3 Fedora Update System 2014-12-11 08:35:39 UTC
python-flask-assets-0.10-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/python-flask-assets-0.10-1.el7

Comment 4 Fedora Update System 2014-12-11 09:06:37 UTC
python-flask-assets-0.10-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-flask-assets-0.10-1.fc20

Comment 5 Fedora Update System 2014-12-12 23:07:10 UTC
Package python-flask-assets-0.10-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-flask-assets-0.10-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-4635/python-flask-assets-0.10-1.el7
then log in and leave karma (feedback).

Comment 6 Tim Flink 2014-12-16 21:20:58 UTC
Just to make this more fun, Flask-Assets-0.10 doesn't work in epel7 because it's not compatible with the python-webassets-0.9 that's in epel7.

I end up with a traceback in my app that uses Flask-Assets when 0.10 is installed:

   File "/usr/lib/python2.7/site-packages/webassets/ext/jinja2.py", line 181, in _render_assets
     urls = bundle.urls(env=env)
   File "/usr/lib/python2.7/site-packages/webassets/bundle.py", line 685, in urls
     urls.extend(bundle._urls(env, extra_filters, *args, **kwargs))
   File "/usr/lib/python2.7/site-packages/webassets/bundle.py", line 648, in _urls
     return [self._make_output_url(env)]
   File "/usr/lib/python2.7/site-packages/webassets/bundle.py", line 605, in _make_output_url
     version = self.get_version(env, refresh=env.auto_build)
   File "/usr/lib/python2.7/site-packages/webassets/bundle.py", line 223, in get_version
     version = env.versions.determine_version(self, env)
   File "/usr/lib/python2.7/site-packages/webassets/version.py", line 157, in determine_version
     hunk = FileHunk(bundle.resolve_output(env))
   File "/usr/lib/python2.7/site-packages/webassets/bundle.py", line 243, in resolve_output
     output = env.resolver.resolve_output_to_path(self.output, self)
TypeError: resolve_output_to_path() takes exactly 4 arguments (3 given)

If I rebuild python-flask-assets with the released 0.9, it works fine. I realize that I requested the 0.10 version but I didn't know it wouldn't work with the existing python-webassets in epel7.

Updating python-webassets in epel7 to 0.10 would be another option to fix this particular issue. The only other package that requires python-webassets is python-nikola-extras (part of python-nikola) but that isn't packaged for epel7. However, given the updates that have been going into the epel7 branch, I suspect that there are users of that who would be affected by a version change

Comment 7 Tim Flink 2014-12-17 04:37:37 UTC
dcallagh built a new python-webassets in epel7 with several of the 0.10 features added. he suggests building python-flask-assets-0.10 against that new build but with commit faaa9d599d07955ab400eafcb33c4f0c080f01aa reverted.

I haven't had the chance to do this yet but will give it a test and submit a patch if it works for me.

Comment 8 Tim Flink 2014-12-17 22:33:27 UTC
I built a new python-flask-assets-0.10 like I described in c#7. With the patches and python-webassets-0.9-5.el7, everything appears to be working.

I'm attaching a diff for the specfile containing the changes I made and the required patches. I've tested it with epel7 and built with rawhide. I've not done any testing on the resultant build outside of epel but outside of the %check, it doesn't change anything significant for fedora builds.

Comment 9 Tim Flink 2014-12-17 22:35:49 UTC
Created attachment 970326 [details]
patch for python-flask-assets specfile to work in epel7

Comment 10 Tim Flink 2014-12-17 22:38:28 UTC
Created attachment 970327 [details]
patch to remove flask-script requirements and fix test skipping

this patch removes the hard requirement of flask-script from the setup.py so that the build works with %check since there is no epel7 build of flask-script.

The other part of this patch re-orders some code so that the bit which skips the test when flask-script is not present is executed before an import explodes due to the non-presense of flask-script.

Submitted a PR upstream containing that part of the patch: https://github.com/miracle2k/flask-assets/pull/89

Comment 11 Tim Flink 2014-12-17 22:40:51 UTC
Created attachment 970328 [details]
patch to back out much of the API changes required for python-webassets-0.10

since python-webassets-0.10 is not available for epel7, some patching was needed to get everything to work.

with the python-webassets-0.9-5 build, most of the changes have been taken care of. This patch reverts upstream commit faaa9d599d07955ab400eafcb33c4f0c080f01aa and downgrades the hard requirement on webassets-0.10

Comment 12 Tim Flink 2014-12-17 22:55:41 UTC
Created attachment 970330 [details]
correct patch to remove flask-script requirements and fix test skipping

whoops, attached the wrong version of the patch to fix the flask-script requirements for %check

Comment 13 Tim Flink 2015-01-13 14:33:21 UTC
It's been a while with no new build for python-flask-assets - is there some objection to the submitted patches?

Comment 14 Praveen Kumar 2015-01-13 16:43:04 UTC
(In reply to Tim Flink from comment #13)
> It's been a while with no new build for python-flask-assets - is there some
> objection to the submitted patches?

I will do that first thing tomorrow morning. Thanks for catching up with it.

Comment 15 Fedora Update System 2015-01-14 05:28:27 UTC
python-flask-assets-0.10-2.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/python-flask-assets-0.10-2.el7

Comment 16 pjp 2016-08-29 12:15:42 UTC
Hello,

Looks like this updated was stalled. Please close this bug if no action pending.

Thank you.