Page MenuHomeFreeBSD

Version specific ports of "unpackaged" Python standard library modules
ClosedPublic

Authored by lwhsu on Nov 15 2015, 8:04 PM.

Details

Summary

Add version specified ports of separated standard Python modules for
non-default Python versions:

  • Add pyXY-{sqlite3,gdbm,tkinter} ports for generating binary packages
  • Improve/add pkg-message to point users to install respective packages of separated Python standard modules
  • Add COMMENT to explicitly show the Python version that package should be used with
  • Simplify version-related PYTHON_* for lang/python35

databases/py32-gdbm
databases/py33-gdbm
databases/py34-gdbm
databases/py35-gdbm
databases/py32-sqlite3
databases/py33-sqlite3
databases/py34-sqlite3
databases/py35-sqlite3
x11-toolkits/py32-tkinter
x11-toolkits/py33-tkinter
x11-toolkits/py34-tkinter
x11-toolkits/py35-tkinter

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lwhsu updated this revision to Diff 10212.Nov 15 2015, 8:04 PM
lwhsu retitled this revision from to Version specified ports of separated standard Python modules.
lwhsu updated this object.
lwhsu edited the test plan for this revision. (Show Details)
lwhsu added a project: Python.
lwhsu updated this revision to Diff 10214.Nov 15 2015, 8:09 PM

Weird, these Makefile's should not be empty

lwhsu added a comment.Nov 15 2015, 8:16 PM

Hmm, I just don't know why the added Makefile's are shown as empty in phabricator...
I put my patch here first: https://people.freebsd.org/~lwhsu/patch/python-standard-ports.diff
I'll ask what's going on.

koobs retitled this revision from Version specified ports of separated standard Python modules to Version specific ports of "unpackaged" Python standard library modules.Nov 18 2015, 10:03 AM
koobs edited edge metadata.
koobs added a subscriber: eadler.

@lwhsu There's a bug in arc(8) client where the contents are not uploaded for newly created files (cc @eadler x 5)

Workaround: svn diff > patch the path, then click "Update Diff" inside this review to manually update it

koobs requested changes to this revision.Nov 18 2015, 10:05 AM
koobs edited edge metadata.
This revision now requires changes to proceed.Nov 18 2015, 10:05 AM
lwhsu updated this revision to Diff 10289.Nov 18 2015, 10:18 AM
lwhsu edited edge metadata.

Manually upload the diff.

Should we be customising pkg-message's for the respective lang/pythonXY port to point directly to these suffixed-versions?

How else will a user know where/how to find them, instead of just attempting to install the suffix-less version?

In D4170#88336, @koobs wrote:

Should we be customising pkg-message's for the respective lang/pythonXY port to point directly to these suffixed-versions?

Makes sense, and we have discussed about adding pkg-message for lang/python{33,34}

How else will a user know where/how to find them, instead of just attempting to install the suffix-less version?

And perhaps I can also update this patch to make COMMENT include version, like lang/clang37.

Agreed, output on pkg info / version should be version specific (nice for concurrent installations)

lwhsu updated this revision to Diff 10293.Nov 18 2015, 1:57 PM
lwhsu edited edge metadata.
lwhsu added a comment.Nov 18 2015, 2:10 PM
In D4170#88316, @koobs wrote:

@lwhsu There's a bug in arc(8) client where the contents are not uploaded for newly created files (cc @eadler x 5)
Workaround: svn diff > patch the path, then click "Update Diff" inside this review to manually update it

BTW, @koobs, are you sure the issue is in arc itself?

koobs added a comment.Nov 18 2015, 3:09 PM
In D4170#88363, @lwhsu wrote:
In D4170#88316, @koobs wrote:

@lwhsu There's a bug in arc(8) client where the contents are not uploaded for newly created files (cc @eadler x 5)
Workaround: svn diff > patch the path, then click "Update Diff" inside this review to manually update it

BTW, @koobs, are you sure the issue is in arc itself?

I am not :)

koobs requested changes to this revision.Nov 18 2015, 3:14 PM
koobs edited edge metadata.
  • I'd remove "for " from COMMENT
  • Replace hard coded pyxy in pkg-message with SUB_FILES (make future repocopies safer, reduce diffs)
This revision now requires changes to proceed.Nov 18 2015, 3:14 PM
lwhsu updated this revision to Diff 10298.Nov 18 2015, 4:21 PM
lwhsu edited edge metadata.
lwhsu added a comment.Nov 18 2015, 4:24 PM
In D4170#88374, @koobs wrote:
  • I'd remove "for " from COMMENT

Done.

  • Replace hard coded pyxy in pkg-message with SUB_FILES (make future repocopies safer, reduce diffs)

Done, I should think one more second. :)

BTW, why does lang/python35 use DISTVERSION instead of PORTVERSION?

koobs added a comment.Nov 18 2015, 4:26 PM
In D4170#88389, @lwhsu wrote:

BTW, why does lang/python35 use DISTVERSION instead of PORTVERSION?

It was committed while it was 3.5.0rc3 :)

koobs added a comment.EditedNov 18 2015, 4:30 PM

Other than PYTHON_SUFFIX=${PORTVERSION:R:S/.g}// (isn't PYTHON_SUFFIX already defined/available via python.mk) the changes look good

I'm assuming you've QA'd (poudriere) the ports to confirm that pass checks (I cant see it in the TEST PLAN section)

Edit: Will wait for your reply to this comment before I accept/request changes

lang/python32/Makefile
34 ↗(On Diff #10298)

Isn't PYTHON_SUFFIX already set by python.mk ?

www/py-gunicorn] make -V PYTHON_SUFFIX
27
lwhsu added inline comments.Nov 18 2015, 4:39 PM
lang/python32/Makefile
34 ↗(On Diff #10298)

Yes, but lang/python* doesn't include python.mk:

lang/python32 > make -V PYTHON_SUFFIX
lwhsu updated this revision to Diff 10299.Nov 18 2015, 4:45 PM
lwhsu edited edge metadata.
  • Replace DISTVERSION with PORTVERSION for lang/python35
lwhsu added a comment.Nov 18 2015, 4:47 PM
In D4170#88391, @koobs wrote:

Other than PYTHON_SUFFIX=${PORTVERSION:R:S/.g}// (isn't PYTHON_SUFFIX already defined/available via python.mk) the changes look good

lang/python* doesn't include python.mk, so that's needed.

OTOH, lang/python35 duplicates itself, so I just use it.

I'm assuming you've QA'd (poudriere) the ports to confirm that pass checks (I cant see it in the TEST PLAN section)

Yes I'm running the final testing, I'll commit that after confirm it passed.

Edit: Will wait for your reply to this comment before I accept/request changes

koobs added a comment.EditedNov 18 2015, 4:58 PM
This comment has been deleted.
lang/python35/Makefile
8–30 ↗(On Diff #10299)

These variables should be safe for all/any future values of PORTVERSION or DISTVERSION (with or without alpha/beta/rcX suffixed).

I believe that's why I set them to DISTVERSION, since DISTVERSION is always calculated (and the same as PORTVERSION, if set)

lwhsu added a comment.Nov 18 2015, 5:00 PM

Summaries of the changes:

  • Add pyXY-{sqlite3,gdbm,tkinter} ports for generating binary packages
  • Improve/add pkg-message to point users to install respective packages of separated Python standard modules
  • Add COMMENT to explicitly show the Python version that package should be used with
  • Replace DISTVERSION with PORTVERSION for lang/python35
koobs updated this object.Nov 18 2015, 5:01 PM
lwhsu updated this revision to Diff 10305.Nov 18 2015, 5:29 PM
lwhsu updated this object.
lwhsu@lwbsd:~/ports/lang/python35 > make -V PYTHON_PORTVERSION
3.5.0
lwhsu@lwbsd:~/ports/lang/python35 > make -V PYTHON_VER
3.5
lwhsu@lwbsd:~/ports/lang/python35 > make -V PYTHON_VERSION
python3.5
lwhsu@lwbsd:~/ports/lang/python35 > make -V PYTHON_SUFFIX
35
lwhsu@lwbsd:~/ports/lang/python35 > make -V PKGNAME
python35-3.5.0_1
lwhsu marked an inline comment as done.Nov 18 2015, 5:30 PM

After discussing on IRC, latest change makes sense now.

koobs accepted this revision.Nov 18 2015, 5:34 PM
koobs edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Nov 18 2015, 5:34 PM
This revision was automatically updated to reflect the committed changes.