Bug 212673 - net/py-twitter: Rename to py-python-twitter
Summary: net/py-twitter: Rename to py-python-twitter
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Danilo G. Baio
URL: https://reviews.freebsd.org/D10705
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-14 00:37 UTC by Danilo G. Baio
Modified: 2017-05-16 01:15 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+
dbaio: maintainer-feedback+


Attachments
py-twitter-3.1.patch (1.06 KB, patch)
2016-09-14 00:37 UTC, Danilo G. Baio
no flags Details | Diff
py-python-twitter-3.1-v02.patch (1.89 KB, patch)
2016-10-09 22:31 UTC, Danilo G. Baio
no flags Details | Diff
py-python-twitter-3.1-v03.patch (3.39 KB, patch)
2016-10-12 14:01 UTC, Danilo G. Baio
no flags Details | Diff
py-python-twitter-3.1-v04.patch (3.30 KB, patch)
2016-10-23 11:56 UTC, Danilo G. Baio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danilo G. Baio freebsd_committer freebsd_triage 2016-09-14 00:37:35 UTC
Created attachment 174760 [details]
py-twitter-3.1.patch

- Update to 3.1
- Add BUILD_DEPENDS (devel/py-pytest-runner)

Changelog: https://github.com/bear/python-twitter/blob/master/doc/changelog.rst


portlint: OK (looks fine.)
testport: 
	poudriere: i386,  10.3  (OK)
	poudriere: amd64, 10.3  (OK)
	poudriere: i386,  9.3   (OK)
	poudriere: amd64, 9.3   (OK)
	poudriere: i386,  12    (OK)
	poudriere: amd64, 12    (OK)
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-10-09 10:01:25 UTC
@Danilo, 

Even though it is listed in setup_requires, pytest-runner should not be a build dependency. Can you test using the test suite after patching this out please.

Also, this port (net/py-twitter) needs to be renamed to py-python-twitter (python-twitter @ PyPI)

The correct net/py-twitter (twitter @ PyPI) is the currently named net/py-twitter-tools.
Comment 2 Danilo G. Baio freebsd_committer freebsd_triage 2016-10-09 22:31:33 UTC
Created attachment 175591 [details]
py-python-twitter-3.1-v02.patch


Hi koobs@ thanks for the feedback. Could you check it again, please ?

- Rename to py-python-twitter, following PyPI
- Update to 3.1
- Include a patch to ignore a test dependency

Changelog: https://github.com/bear/python-twitter/blob/master/doc/changelog.rst

It's fine to move this port from net/py-twitter to net/py-python-twitter, 
it's not used as dependencies of any port.

I've used svn move for testing on my environment.

How should I proceed with this, patching net/Makefile and MOVED ?
Or a developer could do this ?

[QA]

portlint: OK (looks fine.)
testport: 
	poudriere: i386,  10.3  (OK)
	poudriere: amd64, 10.3  (OK)
	poudriere: i386,  9.3   (OK)
	poudriere: amd64, 9.3   (OK)
	poudriere: i386,  12    (OK)
	poudriere: amd64, 12    (OK)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2016-10-10 03:25:31 UTC
(In reply to Danilo G. Baio (dbaio) from comment #2)

The changes look fine Danilo, thank you.

Do the unit tests pass? (running python setup.py test, to confirm everything is OK at runtime, without pytest-runner installed at build time).

pytest-runner may be needed in setup.py:tests_require (so that setup.py test installs it if not already installed). If this is the case we can submit the change upstream as well.

Feel free to include the net/Makefile changes and the addition to MOVED as well. 

The committer taking care of this can do the 'svn mv' part
Comment 4 Danilo G. Baio freebsd_committer freebsd_triage 2016-10-12 14:01:19 UTC
Created attachment 175666 [details]
py-python-twitter-3.1-v03.patch


Hi @koobs.

Tests are not included at PyPi package[1], so I've moved MASTER_SITES to Github.

[1] - packages=find_packages(exclude=('tests', 'docs')),

New patch:

- Rename to py-python-twitter, following PyPI/Github name
- Update to 3.1
- Move to Github
- Include a patch to ignore a test dependency

Changelog: https://github.com/bear/python-twitter/blob/master/doc/changelog.rst

[QA]

portlint: OK (looks fine.)
testport: 
	poudriere: i386,  9.3   (OK)
	poudriere: amd64, 9.3   (OK)
	poudriere: i386,  10.3  (OK)
	poudriere: amd64, 10.3  (OK)
	poudriere: i386,  11    (OK)
	poudriere: amd64, 11    (OK)
	poudriere: i386,  12    (OK)
	poudriere: amd64, 12    (OK)

py.test (without pytest-runner installed)
---------------------------------------------------------------------
test session starts 

platform freebsd12 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /usr/home/dbaio/FreeBSD/ports/net/py-python-twitter/work/python-twitter-3.1, inifile: pytest.ini
collected 148 items

tests/test_api.py sssssssssssssssss
tests/test_api_30.py .........................................................................
tests/test_filecache.py .....
tests/test_media.py ......
tests/test_models.py ...........
tests/test_parse_tweet.py ..
tests/test_rate_limit.py .......
tests/test_status.py ......
tests/test_trend.py ....
tests/test_tweet_length.py ..
tests/test_twitter_utils.py ....
tests/test_unicode.py .....
tests/test_user.py ......

131 passed, 17 skipped in 4.67 seconds 
---------------------------------------------------------------------
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-10-13 08:27:52 UTC
Very nice work Danilo, thank you.
Comment 6 Danilo G. Baio freebsd_committer freebsd_triage 2016-10-23 11:56:17 UTC
Created attachment 176079 [details]
py-python-twitter-3.1-v04.patch


Sorry, I checked again this issue and the MOVED file was incorrect.

I tried create a patch with "svn move", but with "svn diff --patch-compatible" history was lost, and using just a "svn diff" when applied didn't work correctly.

So, the best approach based on comment 3 and some tests was this:


$ svn patch /tmp/py-python-twitter-3.1-v04.patch
U         MOVED
U         net/Makefile
U         net/py-twitter/Makefile
U         net/py-twitter/distinfo
A         net/py-twitter/files
A         net/py-twitter/files/patch-setup.py

$ svn move net/py-twitter/ net/py-python-twitter/
A         net/py-python-twitter
D         net/py-twitter
D         net/py-twitter/Makefile
D         net/py-twitter/distinfo
D         net/py-twitter/files
D         net/py-twitter/files/patch-setup.py
D         net/py-twitter/pkg-descr

$ svn status
M       MOVED
M       net/Makefile
A  +    net/py-python-twitter
        > moved from net/py-twitter
M  +    net/py-python-twitter/Makefile
M  +    net/py-python-twitter/distinfo
A       net/py-python-twitter/files
A       net/py-python-twitter/files/patch-setup.py
D       net/py-twitter
        > moved to net/py-python-twitter
D       net/py-twitter/Makefile
D       net/py-twitter/distinfo
D       net/py-twitter/pkg-descr

Fix permissions [1]:
chmod 644 MOVED net/Makefile net/py-python-twitter/Makefile net/py-python-twitter/distinfo

[1] - https://issues.apache.org/jira/browse/SVN-4651

portlint and testport are fine.
Comment 7 Danilo G. Baio freebsd_committer freebsd_triage 2016-12-26 14:04:18 UTC
Comment on attachment 176079 [details]
py-python-twitter-3.1-v04.patch

obsolete by ports r429047 and ports r429209
Comment 8 Danilo G. Baio freebsd_committer freebsd_triage 2017-05-13 23:03:07 UTC
I'll take this PR and submit it to a review, thanks.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2017-05-15 14:48:38 UTC
Thanks Danilo, please add review URL to URL field in Bugzilla when created
Comment 10 commit-hook freebsd_committer freebsd_triage 2017-05-16 01:09:43 UTC
A commit references this bug:

Author: dbaio
Date: Tue May 16 01:09:34 UTC 2017
New revision: 440987
URL: https://svnweb.freebsd.org/changeset/ports/440987

Log:
  net/py-twitter: Rename to py-python-twitter

  Renamed to reflect official name at PyPI/Github.

  PR:		212673
  Approved by:	garga (mentor), python (miwi)
  Differential Revision:	https://reviews.freebsd.org/D10705

Changes:
  head/MOVED
  head/net/Makefile
  head/net/py-python-twitter/
  head/net/py-python-twitter/Makefile
  head/net/py-twitter/