Page MenuHomeFreeBSD

devel/py-mongoengine: Update to 0.16.3 and move to databases/py-mongoengine
ClosedPublic

Authored by dvl on Dec 11 2018, 9:54 PM.

Details

Summary
devel/py-mongoengine: Update to 0.16.3

PR: 233945
Reviewed_by: koobs
Differential_Revision: 18519
Test Plan
  • testport: OK (poudriere)

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

dvl created this revision.Dec 11 2018, 9:54 PM
koobs retitled this revision from Upgrade devel/py-mongoengine to 0.16.3 to devel/py-mongoengine: Update to 0.16.3.Dec 13 2018, 10:18 AM
koobs edited the summary of this revision. (Show Details)
koobs edited the test plan for this revision. (Show Details)
koobs added reviewers: wg, koobs.
wg accepted this revision.Dec 13 2018, 10:25 AM

Thanks @koobs ! We could also change maintainer to python@

This revision is now accepted and ready to land.Dec 13 2018, 10:25 AM
koobs requested changes to this revision.Dec 13 2018, 10:32 AM
koobs added inline comments.
devel/py-mongoengine/Makefile
6 ↗(On Diff #51877)

I'd put this in databases too (where mongodb exists)

14 ↗(On Diff #51877)

Add LICENSE_FILE when a license is included in the distribution file.

This Python package includes one in its PyPI source distribution (sdist): LICENSE

15–16 ↗(On Diff #51877)

These are TEST_DEPENDS not (or no longer) BUILD_DEPENDS [1].

This block can be removed, or replaced with TEST_DEPENDS. Note: rednose is not (or no longer a test dependency either).

[1] setup.py:install_requires=['pymongo>=2.7.1', 'six'],

17 ↗(On Diff #51877)
  • Minimum version is 2.7.1 [1]
  • Missing a RUN_DEPENDS on six (>0) [1]

[1] install_requires=['pymongo>=2.7.1', 'six'],

18 ↗(On Diff #51877)

Add TEST_DEPENDS and (do-)test target if a Python package includes tests and supports running them. This gives you super/extra confidence, and an extra step, in QA.

This Python package includes test dependency specifications [1] and test target support [2]

[1] 'tests_require': ['nose', 'coverage==4.2', 'blinker', 'Pillow>=2.0.0'] ( + dateutil if python 2) - Note: coverage can likely be skipped
[2] test_suite='nose.collector',

Something like the following should suffice:

do-test:
   cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
This revision now requires changes to proceed.Dec 13 2018, 10:32 AM
dvl marked 6 inline comments as done.Dec 13 2018, 10:15 PM
dvl updated this revision to Diff 51974.

Add LICENSEFILE
Change BUILD_DEPENDS to TEST_DEPENDS
Add missing TEST_DEPENDS and RUN_DEPENDS
Add do-test target

devel/py-mongoengine/Makefile
6 ↗(On Diff #51877)

I disagree. This isn't a database. It's a tool for working with a database.

18 ↗(On Diff #51877)

How does poudriere handle the do-test?

Do I run: make do-test in the port directory?

koobs requested changes to this revision.Dec 14 2018, 2:57 AM
koobs added inline comments.
devel/py-mongoengine/Makefile
16–19 ↗(On Diff #51974)
  • Collapse into a single TEST_DEPENDS with \ entry line terminators
  • dateutil is a Python 2 only TEST_DEPENDS. Use a if PYTHON_VER < 3 block to add it conditionally
  • The nose dependency is duplicated, remove one
  • TEST_DEPENDS goes (alphabetically) after RUN_DEPENDS
21 ↗(On Diff #51974)

Pillow is a TEST_DEPENDS (setup.py:tests_require)

22–23 ↗(On Diff #51974)

Collapse into a single RUN_DEPENDS with \ entry line terminators

6 ↗(On Diff #51877)

It's for database related things, not just things that implement databases

databases/p5-*
databases/pear-*
databases/pecl-*
...
pgpool*
...
databases/php*-*
databases/py-*
databases/qt*-*
databases/rubygem-*
...
tcl-lmdb/
tcl-Mysql/
tcl-sqlite3/
...
zabbix22-libzbxpgsql/
zabbix3-libzbxpgsql/
zabbix32-libzbxpgsql/
zabbix34-libzbxpgsql

18 ↗(On Diff #51877)

It doesn't (yet): https://github.com/freebsd/poudriere/pull/355

Close, make test to run the target. See Also TEST_* variables in Mk/bsd.port.mk

This revision now requires changes to proceed.Dec 14 2018, 2:57 AM
mat added inline comments.Dec 16 2018, 12:54 PM
devel/py-mongoengine/Makefile
16–23 ↗(On Diff #51974)

Wrong place in the Makefile. See Chapter 15. Order of Variables in Port Makefiles.

14 ↗(On Diff #51877)

I doubt very much this actually builds.

dvl added inline comments.Dec 17 2018, 2:29 PM
devel/py-mongoengine/Makefile
14 ↗(On Diff #51877)

For what it's worth, everything goes through a 'poudriere testport' before I submit it. I'll be working on this later today and will verify this for you.

dvl marked 9 inline comments as done.Dec 17 2018, 3:40 PM

Current status:

  • passes py27 and py36 testports
  • fails make test - I'm working on that.
devel/py-mongoengine/Makefile
6 ↗(On Diff #51877)

Conceded.

I will:

  • svn mv devel/py-mongoengine databases/py-mongoengine
  • update MOVED
  • update RUN_DEPENDS in devel/py-django-tastypie-mongoengine to refer to new location
14 ↗(On Diff #51877)

One should rarely doubt mat

[dvl@dvl:~/FreeBSDPortsWorkingDirectory/databases/py-mongoengine] $ make patch
===>  Missing license file for MIT in LICENSE
*** Error code 1

This corrected that:

LICENSE_FILE=   ${WRKSRC}/LICENSE
dvl retitled this revision from devel/py-mongoengine: Update to 0.16.3 to devel/py-mongoengine: Update to 0.16.3 and move to databases/py-mongoengine.Dec 17 2018, 3:53 PM
dvl marked an inline comment as done.
dvl updated this revision to Diff 52108.Dec 17 2018, 4:04 PM

Move devel/py-mongoengine to databases/py-mongoengine
Update dependent ports

dvl added inline comments.Dec 17 2018, 4:18 PM
databases/py-mongoengine/Makefile
20 ↗(On Diff #52108)

As pointed out by xmj via IRC, I will add a >0 to this.

mat added a comment.Dec 17 2018, 4:28 PM

If having an invalid value in LICENSE_FILE does not make your test builds fails, you may have DISABLE_LICENSES set somewhere.

databases/py-mongoengine/Makefile
28–30 ↗(On Diff #52108)
py27_TEST_DEPENDS=   ...

and remove the port.pre/port.post dance.

dvl added a comment.Dec 17 2018, 4:38 PM

I'll fix those properties next. 'make test' is progressing.

dvl added a comment.Dec 17 2018, 4:43 PM

ran:
svn propset fbsd:nokeywords yes distinfo pkg-descr
svn propset svn:eol-style native distinfo pkg-descr
svn propset svn:mime-type text/plain distinfo pkg-descr

dvl added a comment.Dec 17 2018, 4:48 PM

I am confused by zero tests run

cd /usr/local/DVL/FreeBSDPortsWorkingDirectory/databases/py-mongoengine/work-py27/mongoengine-0.16.3 && /usr/local/bin/python2.7 -c  "import sys; import setuptools;  __file__='setup.py'; sys.argv[0]='setup.py';  exec(compile(open(__file__, 'rb').read().replace(b'\\r\\n', b'\\n'), __file__, 'exec'))" test
running test
Searching for coverage==4.2
Reading https://pypi.org/simple/coverage/
Downloading https://files.pythonhosted.org/packages/f5/47/2e39972c41eb988d551bb2da25c4ee16ea78492ec1b6ffdf09f50cd09b92/coverage-4.2.zip#sha256=a5dda361f947dd67891f73a373ef63059cf3e551ac248dd3e91f76ea1b39cdda
Best match: coverage 4.2
Processing coverage-4.2.zip
Writing /tmp/easy_install-xqvz9B/coverage-4.2/setup.cfg
Running coverage-4.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xqvz9B/coverage-4.2/egg-dist-tmp-sA5fjF
warning: no previously-included files found matching 'ci/appveyor.token'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'tests/eggsrc/build'
no previously-included directories found matching 'tests/eggsrc/dist'
no previously-included directories found matching 'tests/eggsrc/*.egg-info'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
creating /usr/local/DVL/FreeBSDPortsWorkingDirectory/databases/py-mongoengine/work-py27/mongoengine-0.16.3/.eggs/coverage-4.2-py2.7-freebsd-12.0-RELEASE-amd64.egg
Extracting coverage-4.2-py2.7-freebsd-12.0-RELEASE-amd64.egg to /usr/local/DVL/FreeBSDPortsWorkingDirectory/databases/py-mongoengine/work-py27/mongoengine-0.16.3/.eggs

Installed /usr/local/DVL/FreeBSDPortsWorkingDirectory/databases/py-mongoengine/work-py27/mongoengine-0.16.3/.eggs/coverage-4.2-py2.7-freebsd-12.0-RELEASE-amd64.egg
running egg_info
writing requirements to mongoengine.egg-info/requires.txt
writing mongoengine.egg-info/PKG-INFO
writing top-level names to mongoengine.egg-info/top_level.txt
writing dependency_links to mongoengine.egg-info/dependency_links.txt
reading manifest file 'mongoengine.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
writing manifest file 'mongoengine.egg-info/SOURCES.txt'
running build_ext
/usr/local/lib/python2.7/site-packages/nose/config.py:264: RuntimeWarning: Option 'cover-package' in config file 'setup.cfg' ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)

----------------------------------------------------------------------
Ran 0 tests in 0.240s

OK
dvl updated this revision to Diff 52113.Dec 17 2018, 4:51 PM

added >0 to a DEPENDS
setprop on pkg-descr and distinfo

dvl marked an inline comment as done.Dec 17 2018, 6:05 PM
In D18519#396278, @mat wrote:

If having an invalid value in LICENSE_FILE does not make your test builds fails, you may have DISABLE_LICENSES set somewhere.

Confirmed!

dvl added a comment.Dec 19 2018, 8:05 PM

Talking to the project via IRC, waiting for a reply.

dvl added a comment.Jan 8 2019, 2:48 PM

I got nothing from #mongoengine on FreeNode regarding tests. Proceeding.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 8 2019, 2:54 PM
This revision was automatically updated to reflect the committed changes.