python3-pytest: add new package#8562
Conversation
|
cc @jefferyto, @commodo |
jefferyto
left a comment
There was a problem hiding this comment.
Some cross-package comments:
-
atomicwrites, more-itertools, pluggy, py: Would prefer to set
URLto the homepage link as declared on their PyPI project pages (in the Project links sidebar section).For py, I know
URLis already set to their readthedocs.io link, but would prefer to have it exactly as on PyPI (https is okay though), so that the visitor's browser will redirect to the most appropriate language version. -
pluggy, py, pytest-xdist, pytest: These packages use setuptools-scm during setup (you can see this in the
setup_requireslist in theirsetup.py). IIRC without this, the installed packages will not the have correct version number in their.egg-info(I haven't compiled these packages to verify). Can you check to see if this is the case?The way I've dealt with this before, is to pass the Makefile version number to
setup.pyby adding a variable toPYTHON3_PKG_SETUP_VARS, then patchingsetup.pyto use the Makefile version instead of setuptools-scm. (See python-automat for an example.) You may also need to "patch in" the file that setuptools-scm writes to.
|
From my side, this looks good (generally). Looks like some |
|
I see you have updated the Regarding setuptools-scm, I see you have patches to supply setuptools with version numbers, but this is only half the task. Taking pluggy as an example, we can see its which tells setuptools-scm to both pass the version number to setuptools, and write the version number to the file "pluggy/_version.py". The template setuptools-scm uses for this file looks like this: Here try:
from ._version import version as __version__
except ImportError:
# broken installation, we don't even try
# unknown only works because we do poor mans version compare
__version__ = "unknown"( Would appreciate it if you can go through the affected packages (pluggy, py, pytest-xdist, pytest) and add this treatment (in addition to the "do not use setuptools-scm" patches). (I know the example I gave before (python-automat) didn't have this; that package didn't try to write the version number to a file.) Thanks 🙏 😂 |
|
@jefferyto @commodo Hi, I believe that I fixed PR according to your suggestion. I removed pytest-xdist plugin package, updated all packages to the latest version and cherry-picked new one from #9096 . |
|
@ja-pa I have just one request. Would you please add in the commit message for python3-zipp and python3-importlib-metdata above your signed-off-by that you added patches for those two? We would have the same commit message format as OpenWrt in its main repository. As an example what I mean is openwrt/openwrt@64493d4 It's up to you. It's not required, but it would be good to have it. |
|
Otherwise, it looks good to me. |
|
@BKPepe changed as requested. I added explanatory comments to python3-zipp and python3-importlib-metdata commit messages |
|
One general note: maybe sending some of the |
|
@ja-pa There is no Copyright over the cherry-picked Makefiles, can this be a problem? If so please feel free to add your own Copyright. |
|
@aparcar For me it's no problem. If you what to give there your copyright info I have no problem with that. |
|
@ja-pa are you trying to get you patches upstream? I'd be happy to get rid of these patches at some point. Apart from that I'd be happy to merge this (as I need pytest to work) - objections? |
jefferyto
left a comment
There was a problem hiding this comment.
Thanks for following up on the version files 😂
I noticed a few more odds and ends that need to be addressed, but nothing major.
| +python3-importlib-metadata \ | ||
| +python3-packaging \ | ||
| +python3-wcwidth \ | ||
| +python3-zipp |
There was a problem hiding this comment.
pytest doesn't depend on zipp (see below for what does).
There was a problem hiding this comment.
| SUBMENU:=Python | ||
| TITLE:=Like importlib_resources only for metadata | ||
| URL:=https://gitlab.com/python-devs/importlib_metadata | ||
| DEPENDS=+python3-light |
There was a problem hiding this comment.
| CATEGORY:=Languages | ||
| TITLE:=pluggy | ||
| URL:=https://github.com/pytest-dev/pluggy | ||
| DEPENDS:=+python3-light |
There was a problem hiding this comment.
There was a problem hiding this comment.
pluggy still depends on importlib-metadata.
| PKG_HASH:=a9f185022cfa69e9ca5f7eabfd5a58b689894cb78a11e3c8c89398a8ccbb8e7f | ||
|
|
||
| PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org> | ||
| PKG_LICENSE:=MIT |
|
|
||
| PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz> | ||
| PKG_LICENSE:=BSD | ||
| PKG_LICENSE_FILES:=LICENSE |
There was a problem hiding this comment.
Please add LICENSE.APACHE and LICENSE.BSD.
|
I don't think the Actually... now that I think about it, it should be possible to set: and have it installed host-side. I believe (although not 100% sure) all archives downloaded from PyPI have a Apologies @ja-pa for making you jump through all those hoops - while I think the current version number handling is good enough to be merged, this might be the easier/better way of managing this. |
BKPepe
left a comment
There was a problem hiding this comment.
Update importlib-metadata to version 0.19.
|
this PR is kinda old now; since April i don't know if we had a comment on this PR [but it was on one related to pytest], but at this point in time, it really looks like splitting this PR into smaller PRs is easier; at this rate, we will be stuck with this re-re-re-re-reviewing for another 4-5 months also, this PR has 103 comments already; also, i really-really-really-really-really don't want to offend anyone here; i am pretty relaxed now [since coming back from a vacation], but this reminds me of an old internet pic [which i find amusing in this case]: |
|
@commodo Yes, I think that it is best way how to handle this. |
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Paul Spooren <mail@aparcar.org> Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz> [added patch for scm version and Makefile polishing]
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Paul Spooren <mail@aparcar.org> Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz> [added patch for scm version and Makefile polishing]
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
|
Maybe we should migrate this also to pypi.mk? |
|
ping @ja-pa |
|
Merged in this PR #8562 Thx all for the feedback! |

Maintainer: me @ja-pa
Compile tested: Turris Omnia (TOS4), OpenWrt 18.06.2
Run tested: Turris Omnia (TOS4), OpenWrt 18.06.2
Description:
Pytest is a popular testing framework for python. It allows to write scalable and complex test set. It also supports multiple useful plugins like xdist pytest-django and more (see http://plugincompat.herokuapp.com)
I runtested package with examples provided in docs
This PR also adds python dependency required by pytest
Why add this package: