Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#37254 closed defect (fixed)

py25-cairo: SyntaxError: invalid syntax

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: g5pw (Aljaž Srebrnič), drkp (Dan Ports)
Port: py25-cairo

Description

py25-cairo @1.10.0 does not build:

setup.py:50: Warning: 'with' will become a reserved keyword in Python 2.6
  File "setup.py", line 50
    with open(PcFile, 'w') as fo:
            ^
SyntaxError: invalid syntax

Attachments (4)

main.log (7.6 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
37254-1-whitespace.patch (1.8 KB) - added by seanfarley (Sean Farley) 11 years ago.
py-cairo: fix off-by-one whitespace indentation
37254-2-if-block-movement.patch (1.2 KB) - added by seanfarley (Sean Farley) 11 years ago.
py-cairo: move use_bzip2 and patchfiles to if block for > python2.5
37254-3-python-2.5-fix.patch (1.9 KB) - added by seanfarley (Sean Farley) 11 years ago.
py-cairo: update python 2.5 to compatible version; fixes ticket #37254

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

The project's homepage says 1.10.0 requires python 2.6 or greater. I guess that's why the pre-unification py25-cairo port was not updated to that version.

comment:2 in reply to:  1 Changed 11 years ago by seanfarley (Sean Farley)

Replying to ryandesign@…:

The project's homepage says 1.10.0 requires python 2.6 or greater. I guess that's why the pre-unification py25-cairo port was not updated to that version.

Hmmm, I didn't have python 2.4 nor 2.5 in the port file I sent Aljaž (g5pw@…). It seems I can't add him to be CC'd, can I?

Anyway, I can send a patch that adds support for versions 2.4 and 2.5 but they would be old versions due to the upstream project dropping support for those versions. From the mailing list discussion,

http://article.gmane.org/gmane.os.apple.macports.devel/21087

it seems that we should just not bother with 2.4 and 2.5?

comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: g5pw@… added

If you want to fix py25-cairo I agree putting back in the older version (as an explicit subport in the py-cairo port) would be the best option.

If you want to remove py25-cairo then there are probably some existing ports that currently depend on it that you would have to deal with.

comment:4 in reply to:  3 ; Changed 11 years ago by seanfarley (Sean Farley)

Replying to ryandesign@…:

If you want to fix py25-cairo I agree putting back in the older version (as an explicit subport in the py-cairo port) would be the best option.

If you want to remove py25-cairo then there are probably some existing ports that currently depend on it that you would have to deal with.

I can't find anything that depends on py2{4,5}-cairo currently in the macports source tree, so maybe just leave those versions out?

comment:5 in reply to:  4 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Hello! I'm sorry, Sean, I had to add it manually later without warning you because py25-pygtk depends on py25-cairo and a lot of ports depend on py25-pygtk. I could just nix the old ports, that's why I started the discussion in the dev mailing list. So, what should we do?

comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Since a lot of things still depend indirectly on py25-pygtk, it would be simplest to retain it for now. The py-ipython port gives an example of how you can have subports with different versions.

Changed 11 years ago by seanfarley (Sean Farley)

Attachment: 37254-1-whitespace.patch added

py-cairo: fix off-by-one whitespace indentation

Changed 11 years ago by seanfarley (Sean Farley)

py-cairo: move use_bzip2 and patchfiles to if block for > python2.5

Changed 11 years ago by seanfarley (Sean Farley)

py-cairo: update python 2.5 to compatible version; fixes ticket #37254

comment:7 in reply to:  6 Changed 11 years ago by seanfarley (Sean Farley)

Replying to ryandesign@…:

Since a lot of things still depend indirectly on py25-pygtk, it would be simplest to retain it for now. The py-ipython port gives an example of how you can have subports with different versions.

Ok, I've added support for python 2.5 with the three patches I just attached. Let me know if there are any other problems!

comment:8 Changed 11 years ago by drkp (Dan Ports)

Cc: dports@… added

Cc Me!

comment:9 Changed 11 years ago by drkp (Dan Ports)

Resolution: fixed
Status: newclosed

Thanks for the patch -- I committed the whitespace update as r100408 and the other two as r100409. I also set the revision of the py25 subport to 3, since the previous v1.8.2 port had revision 2. (It might not have actually been necessary to bump the revision beyond 2, but I figured I'd do it to be safe since I wasn't paying close attention to all the other changes in the port.)

comment:10 Changed 11 years ago by drkp (Dan Ports)

...and fixed a portindex error in r100410 by moving the if (${python.version} ...) check inside the if {$subport != $name} block.

comment:11 in reply to:  9 Changed 11 years ago by seanfarley (Sean Farley)

Replying to dports@…:

Thanks for the patch -- I committed the whitespace update as r100408 and the other two as r100409.

Thanks, chief!

I also set the revision of the py25 subport to 3, since the previous v1.8.2 port had revision 2. (It might not have actually been necessary to bump the revision beyond 2, but I figured I'd do it to be safe since I wasn't paying close attention to all the other changes in the port.)

Good point. I didn't know the protocol, either, but it wouldn't hurt to bump it.

...and fixed a portindex error in r100410 by moving the if (${python.version} ...) check inside the if {$subport != $name} block.

Hmmm, I didn't get that error. Was it just from running portindex?

Note: See TracTickets for help on using tickets.