This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 632808 - Review Request: python-zope-schema - Zope 3 schemas
Review Request: python-zope-schema - Zope 3 schemas
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Toshio Ernie Kuratomi
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 633138 634515
  Show dependency treegraph
 
Reported: 2010-09-11 00:14 EDT by Robin Lee
Modified: 2014-11-24 16:20 EST (History)
5 users (show)

See Also:
Fixed In Version: python-zope-schema-3.7.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-16 22:59:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
a.badger: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Robin Lee 2010-09-11 00:14:21 EDT
Spec URL: http://cheeselee.fedorapeople.org/python-zope-schema.spec
SRPM URL: http://cheeselee.fedorapeople.org/python-zope-schema-3.6.4-2.fc13.src.rpm
Description:
This package is a zope.interface extension for defining data schemas.

rpmlint results:

$ rpmlint ./python-zope-schema.spec 
./python-zope-schema.spec: W: no-cleaning-of-buildroot %install
./python-zope-schema.spec: W: no-cleaning-of-buildroot %clean
./python-zope-schema.spec: W: no-buildroot-tag
./python-zope-schema.spec: W: no-%clean-section
0 packages and 1 specfiles checked; 0 errors, 4 warnings.

$ rpmlint ./python-zope-schema-3.6.4-2.fc13.src.rpm 
python-zope-schema.src: W: spelling-error Summary(en_US) schemas -> schema, sachems, schemes
python-zope-schema.src: W: spelling-error %description -l en_US schemas -> schema, sachems, schemes
python-zope-schema.src: W: no-cleaning-of-buildroot %install
python-zope-schema.src: W: no-cleaning-of-buildroot %clean
python-zope-schema.src: W: no-buildroot-tag
python-zope-schema.src: W: no-%clean-section
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

$ rpmlint ./python-zope-schema-3.6.4-2.fc13.noarch.rpm 
python-zope-schema.noarch: W: spelling-error Summary(en_US) schemas -> schema, sachems, schemes
python-zope-schema.noarch: W: spelling-error %description -l en_US schemas -> schema, sachems, schemes
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 1 Fabian Affolter 2010-09-11 10:41:27 EDT
(In reply to comment #0)
> rpmlint results:
> 
> $ rpmlint ./python-zope-schema.spec 
> ./python-zope-schema.spec: W: no-cleaning-of-buildroot %install
> ./python-zope-schema.spec: W: no-cleaning-of-buildroot %clean
> ./python-zope-schema.spec: W: no-buildroot-tag
> ./python-zope-schema.spec: W: no-%clean-section
> 0 packages and 1 specfiles checked; 0 errors, 4 warnings.

With the following command you can generate a template file for packages.
$ rpmdev-newspec -m -t python template.spec

Compare the output with your spec file to see how you can get rid of the rpmlint warnings.
Comment 2 Robin Lee 2010-09-11 10:51:53 EDT
The %clean section and buildroot cleaning commands are useless for f13 and above.

Refer to: http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
and
http://fedoraproject.org/wiki/Packaging/Guidelines#.25clean
Comment 3 Toshio Ernie Kuratomi 2010-09-15 17:54:17 EDT
Good:
* Package follows naming guidelines
* spec file follows package name
* License is ZPLv2.1 in spec and source which is an approved license.
* LICENSE.txt file included in package
* Spec file is readable
* Source matches upstream
* No shared libraries so no shared library handling needed
* No bundled libraries found
* Not a relocatable package
* No locale files
* All directories owned
* Files not listed twice
* Permissions are proper
* Macros used consistently
* Code, not content
* No GUI applications
* All filenames are utf-8
* Package builds in koji
* rpmlint - okay.  Notes on output below

Needswork:
* Why did you remove the Requires:  python-setuptools?  It seems to still be
  needed (check setup.py in the tarball or
  %{python_sitelib}/zope.schema-3.6.4-py2.6.egg-info/requires.txt

* The python module directory contains three *.txt files that should go in the
  documentation instead and the tests subdirectory looks like it can be removed
  from the installed package.

Notes:
* Upstream has released 3.7.0 (as a zip file)
* rpmlint:
W: spelling-error Summary(en_US) schemas -> schema, sachems, schemes
False positive

python-zope-schema.src: W: no-cleaning-of-buildroot %install
python-zope-schema.src: W: no-cleaning-of-buildroot %clean
python-zope-schema.src: W: no-buildroot-tag
python-zope-schema.src: W: no-%clean-section

These are not needed on F13 and above.  However, if you are planning on
building for F12, you will need a %clean section.  If this gets built in EPEL5
it will also need a buildroot tag and the code to clean that buildroot at the
start of %install.

-------

Once we resolve the two items in Needswork I'll approve.
Comment 4 Robin Lee 2010-09-15 22:51:33 EDT
I hope we can reach some kind of agreements on the above issues, and popularize the agreements over all Pyhton packages.

* About python-setuptools requirement
In the mechanism of Setuptools, there is no separation of BR and runtime requirement. Setuptools is actually a BR for this package, and not used at runtime. You may run 'grep -R -e '\(setuptools\|pkg_resources\|easy_install\)' src/zope/schema/' to see that. So I think it's no need to require python-setuptools.

* About tests inclusion
I now prefer including the tests. First, the tests may be run by users themself. Second, we should make as little change as possible to the upstream distribution, which is the very spirit of Fedora project.

* About the text files in the module directory.
I now don't prefer moving that files. First, if the tests are included, the text files are possibly needed in the module directory by the tests. Second, in those text files, expressions referring to the modules in the same directory may be employed, for example, 'Please refer to interface.py in this directory.' Third, in some bigger packages, the text files will spread over levels of directories, moving those files makes maintenance more difficult.


I will update the package a moment later.
Comment 5 Toshio Ernie Kuratomi 2010-09-16 00:27:51 EDT
(In reply to comment #4)
> I hope we can reach some kind of agreements on the above issues, and popularize
> the agreements over all Pyhton packages.
> 
> * About python-setuptools requirement
> In the mechanism of Setuptools, there is no separation of BR and runtime
> requirement. Setuptools is actually a BR for this package, and not used at
> runtime. You may run 'grep -R -e '\(setuptools\|pkg_resources\|easy_install\)'
> src/zope/schema/' to see that. So I think it's no need to require
> python-setuptools.
> 
This is only partially correct.  This package uses setuptools namespaces and thus it needs setuptools available in order to properly find elements of the package that may be in multiple directories.  You can test this out by having python-zope-event installed via rpm into the system site-packages and then doing
  $ rpmdev-extract python-zope-schema*noarch.rpm
  $ cd python-zope-schema*/usr/lib/python2.?/site-packages
  $ python
  >>> import zope.schema
  >>> ^D
  $ sudo rpm -e --nodeps python-setuptools
  $ python
  >>> import zope.schema
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "zope/schema/__init__.py", line 16, in <module>
      from zope.schema._field import Field, Container, Iterable, Orderable
    File "zope/schema/_field.py", line 22, in <module>
      from zope.event import notify
  ImportError: No module named event

> * About tests inclusion
> I now prefer including the tests. First, the tests may be run by users
> themself. Second, we should make as little change as possible to the upstream
> distribution, which is the very spirit of Fedora project.
> 
I'm not too keen on including tests when they're bigger than the code that drives the package.  However, tests are something that I can consider cosmetic except.... 

> * About the text files in the module directory.
> I now don't prefer moving that files. First, if the tests are included, the
> text files are possibly needed in the module directory by the tests. Second, in
> those text files, expressions referring to the modules in the same directory
> may be employed, for example, 'Please refer to interface.py in this directory.'
> Third, in some bigger packages, the text files will spread over levels of
> directories, moving those files makes maintenance more difficult.
> 

The text files in this package are documentation.  They must be marked as documentation and put into %{_docdir}.  The tests rely on the text, so it seems strange to leave the tests in the module directory when the text files that they need have been moved where the tests can't find them.
Comment 6 Robin Lee 2010-09-16 00:56:37 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > * About python-setuptools requirement

>   $ rpmdev-extract python-zope-schema*noarch.rpm
>   $ cd python-zope-schema*/usr/lib/python2.?/site-packages
>   $ python
>   >>> import zope.schema
>   >>> ^D
>   $ sudo rpm -e --nodeps python-setuptools
>   $ python
>   >>> import zope.schema
>   Traceback (most recent call last):
>     File "<stdin>", line 1, in <module>
>     File "zope/schema/__init__.py", line 16, in <module>
>       from zope.schema._field import Field, Container, Iterable, Orderable
>     File "zope/schema/_field.py", line 22, in <module>
>       from zope.event import notify
>   ImportError: No module named event
I can't reproduce this.

[cheese@cheese-laptop site-packages]$ rpm -qa python-zope\*
python-zope-testing-3.10.0-2.fc14.noarch
python-zope-exceptions-3.6.1-4.fc14.noarch
python-zope-event-3.5.0.1-4.fc14.noarch
python-zope-interface-3.6.1-3.fc14.i686
[cheese@cheese-laptop site-packages]$ rpm -q python-setuptools
package python-setuptools is not installed
[cheese@cheese-laptop site-packages]$ python
Python 2.7 (r27:82500, Jul 26 2010, 18:19:50) 
[GCC 4.5.0 20100716 (Red Hat 4.5.0-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zope.schema
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named schema
>>> 
[cheese@cheese-laptop site-packages]$ pwd
/home/cheese/rpmbuild/RPMS/noarch/python-zope-schema-3.6.4-2.fc14.noarch/usr/lib/python2.7/site-packages
[cheese@cheese-laptop site-packages]$ sudo rpm -Uvh /home/cheese/rpmbuild/RPMS/noarch/python-zope-schema-3.6.4-2.fc14.noarch.rpm 
Preparing...                ########################################### [100%]
   1:python-zope-schema     ########################################### [100%]
[cheese@cheese-laptop site-packages]$ python
Python 2.7 (r27:82500, Jul 26 2010, 18:19:50) 
[GCC 4.5.0 20100716 (Red Hat 4.5.0-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zope.schema
>>> 


The module can be successfully imported without python-setuptools installed.

> 
> > * About tests inclusion
> I'm not too keen on including tests when they're bigger than the code that
> drives the package.  However, tests are something that I can consider cosmetic
> except.... 
OK. I accept this. I will exclude the tests of this and later packages.

> 
> > * About the text files in the module directory.
> The text files in this package are documentation.  They must be marked as
> documentation and put into %{_docdir}.  The tests rely on the text, so it seems
> strange to leave the tests in the module directory when the text files that
> they need have been moved where the tests can't find them.
OK. I accept this. And will arrange the text files properly in this and later packages.
Comment 7 Toshio Ernie Kuratomi 2010-09-16 01:40:38 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > * About python-setuptools requirement
> 
> >   $ rpmdev-extract python-zope-schema*noarch.rpm
> >   $ cd python-zope-schema*/usr/lib/python2.?/site-packages
> >   $ python
> >   >>> import zope.schema
> >   >>> ^D
> >   $ sudo rpm -e --nodeps python-setuptools
> >   $ python
> >   >>> import zope.schema
> >   Traceback (most recent call last):
> >     File "<stdin>", line 1, in <module>
> >     File "zope/schema/__init__.py", line 16, in <module>
> >       from zope.schema._field import Field, Container, Iterable, Orderable
> >     File "zope/schema/_field.py", line 22, in <module>
> >       from zope.event import notify
> >   ImportError: No module named event
> I can't reproduce this.
> 
> [cheese@cheese-laptop site-packages]$ rpm -qa python-zope\*
> python-zope-testing-3.10.0-2.fc14.noarch
> python-zope-exceptions-3.6.1-4.fc14.noarch
> python-zope-event-3.5.0.1-4.fc14.noarch
> python-zope-interface-3.6.1-3.fc14.i686
> [cheese@cheese-laptop site-packages]$ rpm -q python-setuptools
> package python-setuptools is not installed
> [cheese@cheese-laptop site-packages]$ python
> Python 2.7 (r27:82500, Jul 26 2010, 18:19:50) 
> [GCC 4.5.0 20100716 (Red Hat 4.5.0-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import zope.schema
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named schema
> >>> 
> [cheese@cheese-laptop site-packages]$ pwd
> /home/cheese/rpmbuild/RPMS/noarch/python-zope-schema-3.6.4-2.fc14.noarch/usr/lib/python2.7/site-packages
> [cheese@cheese-laptop site-packages]$ sudo rpm -Uvh
> /home/cheese/rpmbuild/RPMS/noarch/python-zope-schema-3.6.4-2.fc14.noarch.rpm 
> Preparing...                ########################################### [100%]
>    1:python-zope-schema     ########################################### [100%]
> [cheese@cheese-laptop site-packages]$ python
> Python 2.7 (r27:82500, Jul 26 2010, 18:19:50) 
> [GCC 4.5.0 20100716 (Red Hat 4.5.0-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import zope.schema
> >>> 
> 
> 
> The module can be successfully imported without python-setuptools installed.
> 
Interesting -- I can duplicate when python-zope-schema is only in a non-standard location that is in my PYTHONPATH.  I can't duplicate when it is installed in site-packages even though interface is in /usr/lib64 and schemas is in /usr/lib/.   Could be that the nspkg.pth file has some hardcoded element in it, although it doesn't look like it to me.

Well, if it does work, there's no reason to Require setuptools.  Feel free to not require that in the new version (and the same for python-zope-i18nmessageid).
Comment 8 Robin Lee 2010-09-16 02:08:18 EDT
3.7.0-1

Spec URL: http://cheeselee.fedorapeople.org/python-zope-schema.spec
SRPM URL: http://cheeselee.fedorapeople.org/python-zope-schema-3.7.0-1.fc14.src.rpm

Changes:
- Update to 3.7.0
- Move the documents to proper place
- Exclude the tests
Comment 9 Toshio Ernie Kuratomi 2010-09-16 02:35:58 EDT
All problems resolved.  New package builds in koji.  Approved.
Comment 10 Robin Lee 2010-09-16 04:23:27 EDT
Arigatou

New Package SCM Request
=======================
Package Name: python-zope-schema
Short Description: Zope 3 schemas
Owners: cheeselee
Branches: el5 el6 f13 f14
InitialCC:
Comment 11 Kevin Fenzi 2010-09-16 19:01:29 EDT
Git done (by process-git-requests).
Comment 12 Ralph Bean 2014-10-14 08:21:18 EDT
Package Change Request
======================
Package Name: python-zope-schema
New Branches: epel7
Owners: ralph
Comment 13 Jon Ciesla 2014-10-14 08:45:09 EDT
Git done (by process-git-requests).
Comment 14 Fedora Update System 2014-11-07 15:19:20 EST
python-zope-schema-4.4.1-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/python-zope-schema-4.4.1-1.el7
Comment 15 Fedora Update System 2014-11-24 16:20:11 EST
python-zope-schema-4.4.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository.

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