Opened 8 years ago

Closed 8 years ago

#39510 closed enhancement (fixed)

py-oursql @0.9.2 Add variants for mysql, update to 0.9.3.x

Reported by: stevecheckoway (Stephen Checkoway) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: py-oursql

Description

I have updated the Portfile to support mysql51 and mysql55 variants. oursql also supports Python 2.4 through 2.7, so 2.4 and 2.5 were added.

Attachments (6)

py-oursql.Portfile.patch (2.6 KB) - added by stevecheckoway (Stephen Checkoway) 8 years ago.
Portfile patch
Portfile.py-oursql.diff (3.6 KB) - added by stevecheckoway (Stephen Checkoway) 8 years ago.
Support for Python 2.6, 2.7, 3.1, 3.2, 3.3, mysql4, mysql5, mysql51, mysql55, and mysql56
Portfile.py-oursql-1.diff (3.8 KB) - added by stevecheckoway (Stephen Checkoway) 8 years ago.
Updates oursql to 0.9.3 for py3x and 0.9.3.1 for py2x. Drops mysql4 variant and adds mariadb and percona variants.
Portfile.py-oursql-2.diff (4.1 KB) - added by stevecheckoway (Stephen Checkoway) 8 years ago.
Actually use mysql_config in the environment. Replace the maintainer with nomaintainer.
patch-oursqlx-oursql.pyx.diff (290 bytes) - added by stevecheckoway (Stephen Checkoway) 8 years ago.
Fix version number.
patch-oursqlx-oursql.c.diff (1.4 MB) - added by stevecheckoway (Stephen Checkoway) 8 years ago.
Fix version number and regenerate using a version of cython that works with Python 3.3.

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Attachment: py-oursql.Portfile.patch added

Portfile patch

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

Keywords: haspatch added

Then you should also add variants for mysql56, percona and mariadb.

comment:2 Changed 8 years ago by jmroot (Joshua Root)

Cc: habnabit@… removed
Owner: changed from macports-tickets@… to habnabit@…

Do you have a specific need for this module under python 2.4 and 2.5? If not, we really shouldn't add any more modules for these python versions, which are EOL and no longer getting security fixes.

comment:3 Changed 8 years ago by stevecheckoway (Stephen Checkoway)

I do not have any need for it under other versions of Python and I'm happy to have those removed. (It does appear to work correctly though.)

comment:4 in reply to:  1 Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Replying to ryandesign@…:

Then you should also add variants for mysql56, percona and mariadb.

There has to be a better way to handle multiple versions of mysql than the n2 variant conflicts list. Is there no concept of a group of ports all of which satisfy a given dependency and variants for each are mutually conflicting?

I'd never even heard of percona or mariadb and I didn't realize that there was a mysql56 port since I was looking at the py-mysqldb which has mysql4, mysql5, mysql51, and mysql55. (And frankly, I can't even tell what the difference between mysql5 and mysql51 is. They seem identical except that mysql5 includes openssl and mysql51 requires the +openssl variant.) Although there is only one version of mariadb in MP, it seems that it is trying to be binary compatible with various versions of MySQL so one could easily imagine MP having mariadb51 and mariadb55 so yet more variants one could have. It seems unmaintainable.

I also just noticed that there is a newer version of oursql, 0.9.3.1. It seems better to get support for others mysql variants in first and then change version (or the other way around) rather than make both changes at once, but I'm willing to do both at once if that's desired.

Edit: I can't test a mysql56 variant until 39518 is fixed and I just noticed that there is an older ticket for 0.9.3.1 38539 that doesn't seem to have been acted upon.

Last edited 8 years ago by stevecheckoway (Stephen Checkoway) (previous) (diff)

comment:5 Changed 8 years ago by stevecheckoway (Stephen Checkoway)

The lastest diff fixes some mistakes and removes some redundant checks. It also adds mysql56 support.

Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Attachment: Portfile.py-oursql.diff added

Support for Python 2.6, 2.7, 3.1, 3.2, 3.3, mysql4, mysql5, mysql51, mysql55, and mysql56

Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Attachment: Portfile.py-oursql-1.diff added

Updates oursql to 0.9.3 for py3x and 0.9.3.1 for py2x. Drops mysql4 variant and adds mariadb and percona variants.

comment:6 Changed 8 years ago by stevecheckoway (Stephen Checkoway)

The attached Portfile.py-oursql-1.diff patch does the following:

  1. Update py26-oursql and py27-oursql to version 0.9.3.1;
  2. Update py31-oursql, py32-oursql, and py33-oursql to version 0.9.3;
  3. Drop mysql4 variant; and
  4. Add mariadb and percona variants.

mysql4 is dropped because I cannot even build it. I could probably fix the build but mysql4 is ancient and it seems some people want to just drop it.

The py3k release of oursql 0.9.3 does not compile for Python 3.3. See launchpad for details. The attached patch-oursqlx-oursql.c.diff fixes this. The patch has also been sent upstream.

Last edited 8 years ago by stevecheckoway (Stephen Checkoway) (previous) (diff)

comment:7 Changed 8 years ago by stevecheckoway (Stephen Checkoway)

habnabit emailed me today to say that he's no longer maintaining oursql. I'm not sure if the new maintainer is planning on taking ownership of the port or not.

comment:8 Changed 8 years ago by tobypeterson

Owner: changed from habnabit@… to macports-tickets@…

Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Attachment: Portfile.py-oursql-2.diff added

Actually use mysql_config in the environment. Replace the maintainer with nomaintainer.

Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Fix version number.

Changed 8 years ago by stevecheckoway (Stephen Checkoway)

Attachment: patch-oursqlx-oursql.c.diff added

Fix version number and regenerate using a version of cython that works with Python 3.3.

comment:9 Changed 8 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to larryv@…
Status: newassigned
Summary: py-oursql @0.9.2 Add variants for mysqlpy-oursql @0.9.2 Add variants for mysql, update to 0.9.3.x
Version: 2.1.3

comment:10 Changed 8 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

Updated in r111087:111088. I unrolled your variant loop, so to speak, because I found it rather difficult to figure out what was going on. Until some functionality is implemented in base (something I’ve been thinking about), it’s best to err on the side of clarity in Portfiles, even if it’s a little tedious.

Note: See TracTickets for help on using tickets.