Bug 1861435 - Review Request: python-pytest-venv - py.test fixture for creating a virtual environment
Summary: Review Request: python-pytest-venv - py.test fixture for creating a virtual e...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Viktorin (pviktori)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-28 15:39 UTC by Lumír Balhar
Modified: 2020-08-19 12:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-08-19 12:16:15 UTC
Type: ---
Embargoed:
pviktori: fedora-review+


Attachments (Terms of Use)

Description Lumír Balhar 2020-07-28 15:39:22 UTC
Spec URL: https://lbalhar.fedorapeople.org/python-pytest-venv.spec
SRPM URL: https://lbalhar.fedorapeople.org/python-pytest-venv-0.2-1.fc32.src.rpm
Description: pytest-venv is a simple pytest plugin that exposes a venv fixture. The fixture is used to create a new virtual environment which can be used to install packages and run commands inside tests.
Fedora Account System Username: lbalhar

Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=48020378

Comment 1 Miro Hrončok 2020-07-29 09:50:00 UTC
Spec sanity (all soft suggestions):

 1. is the %module_name variable any helpful when used just once?

 2. can the URL be demacronized, so it is easier to copy paste from spec?

 3. is the requirement on python3dist(pytest) not done upstream? have you queried why?

 4. consider "# Remove bundled egg-info" -- it does nothing useful (usually), the macros work with dist-info



A slightly stronger query: Why is this package packaged? Despite the name, it seem to use virtualenv, not venv, and we already have pytest-virtualenv packaged. pytest-virtualenv has a active looking devlopment, while pytest-venv seem rather upstream dead with only 3 versions released, on the same day in November 2016.

I see you've opened https://github.com/mmerickel/pytest-venv/issues/1 which is very friendly of you, however, does pytest-venv have any advantages over pytest-virtualenv?

Comment 2 Lumír Balhar 2020-07-31 06:27:46 UTC
Well, it might be upstream dead but works very well because its implementation is very simple. This package helps me to enable a few more tests for micropipenv package where this is used. It might be possible to switch to pytest-virtualenv but it won't be simple because micropipenv uses and modifies its internals for own purposes. Let me check it.

Comment 3 Lumír Balhar 2020-07-31 07:14:30 UTC
Now I recall why we use pytest-venv instead of pytest-virtualenv.

 - pytest-virtualenv has no possibility to upgrade an existing package if it is already in a virtual environment which is very inconvenient because micropipenv works with different versions of pip a lot and pip is always there
 - pytest-virtualenv fails is you give it a package name with a version ("pip>=9.0,<10.0" for example)

(In reply to Miro Hrončok from comment #1)
> Spec sanity (all soft suggestions):
> 
>  1. is the %module_name variable any helpful when used just once?

Removed.

>  2. can the URL be demacronized, so it is easier to copy paste from spec?

Done.

>  3. is the requirement on python3dist(pytest) not done upstream? have you
> queried why?

Yes and yes. See https://github.com/mmerickel/pytest-venv/pull/2

>  4. consider "# Remove bundled egg-info" -- it does nothing useful
> (usually), the macros work with dist-info

Done

Comment 4 Petr Viktorin (pviktori) 2020-08-06 09:59:46 UTC
Nitpick for the Summary: "py.test" is the old name; nowadays it's called "pytest"

Package APPROVED



Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

Generic:
[X]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[X]: License field in the package spec file matches the actual license.
[X]: Package contains no bundled libraries without FPC exception.
[X]: Changelog in prescribed format.
[X]: Sources contain only permissible code or content.
[X]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[X]: Package uses nothing in %doc for runtime.
[X]: Package consistently uses macros (instead of hard-coded directory
     names).
[X]: Package is named according to the Package Naming Guidelines.
[X]: Package does not generate any conflict.
[X]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[X]: Requires correct, justified where necessary.
[X]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[X]: Package is not known to require an ExcludeArch tag.
[X]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[X]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[X]: Python eggs must not download any dependencies during the build
     process.
[X]: A package which is used by another package via an egg interface should
     provide egg info.
[X]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[X]: Final provides and requires are sane (see attachments).
[X]: Package functions as described.
[X]: Latest version is packaged.
[X]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[X]: Package should compile and build into binary rpms on all supported
     architectures.
[X]: %check is present and all tests pass.
[X]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-pytest-venv-0.2-1.fc33.noarch.rpm
          python-pytest-venv-0.2-1.fc33.src.rpm
python3-pytest-venv.noarch: W: summary-not-capitalized C py.test fixture for creating a virtual environment
python-pytest-venv.src: W: summary-not-capitalized C py.test fixture for creating a virtual environment
2 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
python3-pytest-venv.noarch: W: summary-not-capitalized C py.test fixture for creating a virtual environment
python3-pytest-venv.noarch: W: invalid-url URL: https://github.com/mmerickel/pytest-venv <urlopen error [Errno -3] Temporary failure in name resolution>
1 packages and 0 specfiles checked; 0 errors, 2 warnings.


(All OK: py.test is supposed to be lowercase; I disabled the network)


Source checksums
----------------
https://files.pythonhosted.org/packages/source/p/pytest-venv/pytest-venv-0.2.tar.gz :
  CHECKSUM(SHA256) this package     : 4d0f78e0a6b2f6817061fbfbf4fb9c4a289034808946306fc11ee5ad9156e055
  CHECKSUM(SHA256) upstream package : 4d0f78e0a6b2f6817061fbfbf4fb9c4a289034808946306fc11ee5ad9156e055


Requires
--------
python3-pytest-venv (rpmlib, GLIBC filtered):
    python(abi)
    python3.9dist(setuptools)
    python3.9dist(virtualenv)
    python3dist(pytest)



Provides
--------
python3-pytest-venv:
    python-pytest-venv
    python3-pytest-venv
    python3.9-pytest-venv
    python3.9dist(pytest-venv)
    python3dist(pytest-venv)



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -b 1861435
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Python, Shell-api
Disabled plugins: Ocaml, Perl, R, SugarActivity, C/C++, Java, Haskell, PHP, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Gwyn Ciesla 2020-08-07 12:49:18 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pytest-venv


Note You need to log in before you can comment on or make changes to this bug.