From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 10/10] python3-pytest: new package
Date: Fri, 3 Jul 2020 13:06:22 +0200 [thread overview]
Message-ID: <20200703110622.GG24749@pengutronix.de> (raw)
In-Reply-To: <e81d0a4e311fa45638aa7db838c3252c890b6566.camel@pengutronix.de>
On Fri, Jul 03, 2020 at 11:54:33AM +0200, Philipp Zabel wrote:
> On Fri, 2020-07-03 at 11:22 +0200, Michael Olbrich wrote:
> > On Thu, Jul 02, 2020 at 03:05:18PM +0200, Philipp Zabel wrote:
> > > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > > ---
> > > rules/python3-pytest.in | 15 +++++++++
> > > rules/python3-pytest.make | 68 +++++++++++++++++++++++++++++++++++++++
> > > 2 files changed, 83 insertions(+)
> > > create mode 100644 rules/python3-pytest.in
> > > create mode 100644 rules/python3-pytest.make
> > >
> > > diff --git a/rules/python3-pytest.in b/rules/python3-pytest.in
> > > new file mode 100644
> > > index 000000000000..e92a6eeba7de
> > > --- /dev/null
> > > +++ b/rules/python3-pytest.in
> > > @@ -0,0 +1,15 @@
> > > +## SECTION=python3
> > > +
> > > +config PYTHON3_PYTEST
> > > + tristate
> > > + select PYTHON3
> > > + select PYTHON3_ATTRS if RUNTIME
> > > + select PYTHON3_MORE_ITERTOOLS if RUNTIME
> > > + select PYTHON3_PACKAGING if RUNTIME
> > > + select PYTHON3_PLUGGY if RUNTIME
> > > + select PYTHON3_PY if RUNTIME
> > > + select PYTHON3_SETUPTOOLS if RUNTIME # for pkg_resources
> > > + select PYTHON3_WCWIDTH if RUNTIME
> > > + prompt "pytest"
> > > + help
> > > + pytest: simple powerful testing with Python
> > > diff --git a/rules/python3-pytest.make b/rules/python3-pytest.make
> > > new file mode 100644
> > > index 000000000000..f37a45933eda
> > > --- /dev/null
> > > +++ b/rules/python3-pytest.make
> > > @@ -0,0 +1,68 @@
> > > +# -*-makefile-*-
> > > +#
> > > +# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
> > > +#
> > > +# For further information about the PTXdist project and license conditions
> > > +# see the README file.
> > > +#
> > > +
> > > +#
> > > +# We provide this package
> > > +#
> > > +PACKAGES-$(PTXCONF_PYTHON3_PYTEST) += python3-pytest
> > > +
> > > +#
> > > +# Paths and names
> > > +#
> > > +PYTHON3_PYTEST_VERSION := 5.4.3
> > > +PYTHON3_PYTEST_MD5 := 4b6b06b2818516c7c400d4cafe3b9257
> > > +PYTHON3_PYTEST := pytest-$(PYTHON3_PYTEST_VERSION)
> > > +PYTHON3_PYTEST_SUFFIX := tar.gz
> > > +PYTHON3_PYTEST_URL := https://pypi.python.org/packages/8f/c4/e4a645f8a3d6c6993cb3934ee593e705947dfafad4ca5148b9a0fde7359c/$(PYTHON3_PYTEST).$(PYTHON3_PYTEST_SUFFIX)
> > > +
> > > +PYTHON3_PYTEST_SOURCE := $(SRCDIR)/$(PYTHON3_PYTEST).$(PYTHON3_PYTEST_SUFFIX)
> > > +PYTHON3_PYTEST_DIR := $(BUILDDIR)/$(PYTHON3_PYTEST)
> > > +PYTHON3_PYTEST_LICENSE := MIT
> > > +PYTHON3_PYTEST_LICENSE_FILES := \
> > > + file://LICENSE;md5=81eb9f71d006c6b268cf4388e3c98f7b
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Prepare
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +PYTHON3_PYTEST_CONF_TOOL := python3
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/python3-pytest.install:
> > > + @$(call targetinfo)
> > > + @$(call world/install, PYTHON3_PYTEST)
> > > + @sed -i 's;#!/.*;#!/usr/bin/python$(PYTHON3_MAJORMINOR);' \
> > > + $(PYTHON3_PYTEST_PKGDIR)/usr/bin/*
> >
> > This probably replaces the py.test with a copy of pytest.
>
> The two files different files even without this:
>
> packages/pytest-5.4.3/usr/bin/py.test:
>
> ----------8<----------
> #!/path/to/sysroot-host/bin/python3.7
> # EASY-INSTALL-ENTRY-SCRIPT: 'pytest==5.4.3','console_scripts','py.test'
> __requires__ = 'pytest==5.4.3'
> import re
> import sys
> from pkg_resources import load_entry_point
>
> if __name__ == '__main__':
> sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
> sys.exit(
> load_entry_point('pytest==5.4.3', 'console_scripts', 'py.test')()
> )
> ---------->8----------
>
> packages/pytest-5.4.3/usr/bin/pytest:
>
> ----------8<----------
> #!/path/to/sysroot-host/bin/python3.7
> # EASY-INSTALL-ENTRY-SCRIPT: 'pytest==5.4.3','console_scripts','pytest'
> __requires__ = 'pytest==5.4.3'
> import re
> import sys
> from pkg_resources import load_entry_point
>
> if __name__ == '__main__':
> sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
> sys.exit(
> load_entry_point('pytest==5.4.3', 'console_scripts', 'pytest')()
> )
> ---------->8----------
>
> > > + @$(call touch)
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Target-Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/python3-pytest.targetinstall:
> > > + @$(call targetinfo)
> > > +
> > > + @$(call install_init, python3-pytest)
> > > + @$(call install_fixup, python3-pytest, PRIORITY, optional)
> > > + @$(call install_fixup, python3-pytest, SECTION, base)
> > > + @$(call install_fixup, python3-pytest, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
> > > + @$(call install_fixup, python3-pytest, DESCRIPTION, missing)
> > > +
> > > + @$(call install_glob, python3-pytest, 0, 0, -, \
> > > + /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/,, *.py)
> > > + @$(call install_copy, python3-pytest, 0, 0, 0755, -, /usr/bin/pytest)
> > > + @$(call install_copy, python3-pytest, 0, 0, 0755, -, /usr/bin/py.test)
> >
> > At least on Debian, this is a symlink to pytest.
>
> Ok, should I do the same?
Yes please. I'm pretty sure the two scripts are doing exactly the same
thing.
Michael
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2020-07-03 11:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 13:05 [ptxdist] [PATCH 01/10] python3-attrs: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 02/10] python3-importlib-metadata: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 03/10] python3-more-itertools: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 04/10] python3-packaging: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 05/10] python3-pluggy: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 06/10] python3-py: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 07/10] python3-pyparsing: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 08/10] python3-wcwidth: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 09/10] python3-zipp: " Philipp Zabel
2020-07-02 13:05 ` [ptxdist] [PATCH 10/10] python3-pytest: " Philipp Zabel
2020-07-03 9:22 ` Michael Olbrich
2020-07-03 9:54 ` Philipp Zabel
2020-07-03 11:06 ` Michael Olbrich [this message]
2020-07-03 9:19 ` [ptxdist] [PATCH 01/10] python3-attrs: " Michael Olbrich
2020-07-03 9:54 ` Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200703110622.GG24749@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox