Bug 632808
Summary: | Review Request: python-zope-schema - Zope 3 schemas | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robin Lee <robinlee.sysu> |
Component: | Package Review | Assignee: | Toshio Ernie Kuratomi <a.badger> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | a.badger, fedora-package-review, mail, notting, rbean |
Target Milestone: | --- | Flags: | a.badger:
fedora-review+
gwync: fedora-cvs+ |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
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-17 02:59:19 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 633138, 634515 |
Description
Robin Lee
2010-09-11 04:14:21 UTC
(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. 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 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. 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. (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. (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. (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). 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 All problems resolved. New package builds in koji. Approved. Arigatou New Package SCM Request ======================= Package Name: python-zope-schema Short Description: Zope 3 schemas Owners: cheeselee Branches: el5 el6 f13 f14 InitialCC: Git done (by process-git-requests). Package Change Request ====================== Package Name: python-zope-schema New Branches: epel7 Owners: ralph Git done (by process-git-requests). 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 python-zope-schema-4.4.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository. |