Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1245889 (pymssql) - Review Request: python-pymssql - Microsoft SQL Server adapter for Python
Summary: Review Request: python-pymssql - Microsoft SQL Server adapter for Python
Keywords:
Status: CLOSED DUPLICATE of bug 1498472
Alias: pymssql
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2015-07-23 05:34 UTC by Stefan Nuxoll
Modified: 2017-10-04 12:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-04 11:59:13 UTC


Attachments (Terms of Use)

Description Stefan Nuxoll 2015-07-23 05:34:23 UTC
Spec URL: https://snuxoll.fedorapeople.org/packages/python-pymssql.spec
SRPM URL: https://snuxoll.fedorapeople.org/packages/python-pymssql-2.1.1-1.fc22.src.rpm
Description: A simple database interface for Python that builds on top of FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft SQL Server.
Fedora Account System Username: snuxoll

Comment 1 Stefan Nuxoll 2015-07-23 05:44:18 UTC
I suppose I should note that this is my first package and that I will need a sponsor.

This package has completed a successful Koji scratch build on:

Fedora 22: http://koji.fedoraproject.org/koji/taskinfo?taskID=10445560
Fedora 23: http://koji.fedoraproject.org/koji/taskinfo?taskID=10445585

Currently it's failing on EPEL 7, which is a branch I'm looking to target, hopefully I'll have this working later today.

EPEL 7:    http://koji.fedoraproject.org/koji/taskinfo?taskID=10445576

Comment 2 Stefan Nuxoll 2015-07-23 05:54:31 UTC
Got the EPEL scratch build working with a patch to setup.py, the src rpm and spec file linked have been updated with the changes:

EPEL7:  http://koji.fedoraproject.org/koji/taskinfo?taskID=10445673

Comment 3 Stefan Nuxoll 2015-07-24 06:16:46 UTC
I've run fedora-review against my packaged and realized the package license was missing, I've resolved this issue.

Current spec: https://snuxoll.fedorapeople.org/packages/python-pymssql.spec
Current srpm: https://snuxoll.fedorapeople.org/packages/python-pymssql-2.1.1-1.fc24.src.rpm

Comment 4 Miroslav Suchý 2015-08-17 14:11:43 UTC
I believe there should be no blank line after %description.

Please use macros consistently
I.e. instead of $RPM_BUILD_ROOT please use %{buildroot}.
%{optflags} instead of $RPM_OPT_FLAGS

rm -rf $RPM_BUILD_ROOT
is not needed unless you target el5

%if 0%{?fedora}
%bcond_without python3
%else
%bcond_with python3
%endif

What is %bcond_without?
This evaluate on my machine to:

%if 0%{?fedora}
%else
%endif

which raise
error: /tmp/1245889-python-pymssql/srpm/python-pymssql.spec:6: bad %if condition


Why do you use simple
  %doc
in %files section without anything specified after that. Then you do not need to use it at all.

Comment 5 Stefan Nuxoll 2015-08-17 14:50:16 UTC
Thanks, those are all present in the python template generated by rpmdev-newspec, so I left them alone, I'll go ahead and correct them and post an updated spec later today.

Comment 6 Miroslav Suchý 2015-09-09 16:53:41 UTC
Ping? Any progress?

Comment 7 Miroslav Suchý 2015-10-01 10:46:59 UTC
Ping? Any progress?

Comment 8 Miroslav Suchý 2016-01-07 13:30:04 UTC
Still no progress. Closing for now. If you ever want to continue, feel free to
reopen this bug or file new one.

Comment 9 Stefan Nuxoll 2016-01-29 03:57:15 UTC
I have made some significant changes and am ready to resubmit this package for review

Current spec: https://snuxoll.fedorapeople.org/packages/python-pymssql.spec
Current srpm: https://snuxoll.fedorapeople.org/packages/python-pymssql-2.1.1-1.fc24.src.rpm

I have removed the extraneous %doc tags, and also am building debug packages which previously did not exist.

Scratch builds are passing for both
EPEL7 http://koji.fedoraproject.org/koji/taskinfo?taskID=12718196

and

Fedora 23 http://koji.fedoraproject.org/koji/taskinfo?taskID=12718180

%bcond_with and %bcond_without are there to support passing --with and --without python3 to rpmbuild, as these are part of the standard RPM template for python packages I see no reason to remove these.

Comment 10 Upstream Release Monitoring 2016-01-29 04:00:52 UTC
snuxoll's scratch build of python-pymssql-2.1.1-1.fc24.src.rpm for f24 completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12718180

Comment 11 Miroslav Suchý 2016-02-08 23:40:20 UTC
There should be no line after %description (otherwise the blank line goes to description as well). It should be:
%description
A simple database ...

Instead of
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
you should call:
  %{py2_build}
or use %{optflags} macro which pass various other option e.g. -O2 and hardened build. The same for python3 build.

Also the tar contains tests. Can you run them in %check section?

Tar file contains various documentation. You can add them to package (or to -doc subpackage) as
%files doc
%doc docs/*.rst
%doc docs/ref/*.rst
%doc docs/conf.py
%doc *.rst

Comment 12 Stefan Nuxoll 2016-02-08 23:47:00 UTC
(In reply to Miroslav Suchý from comment #11)
> There should be no line after %description (otherwise the blank line goes to
> description as well). It should be:
> %description
> A simple database ...
> 
> Instead of
> %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
> you should call:
>   %{py2_build}
> or use %{optflags} macro which pass various other option e.g. -O2 and
> hardened build. The same for python3 build.
> 
> Also the tar contains tests. Can you run them in %check section?
> 
> Tar file contains various documentation. You can add them to package (or to
> -doc subpackage) as
> %files doc
> %doc docs/*.rst
> %doc docs/ref/*.rst
> %doc docs/conf.py
> %doc *.rst

optflags are passed when setup.py is called in the build phase, they are not passed in the install phase as the native extensions have already been build.

Are the py2_build/py3_build and py2_install/py3_install macros supported by the EPEL buildroots? If so I have no problem using them, otherwise as EPEL7 support is desired for this package the 'old' way suffices.

Unfortunately as the unit tests for this project require access to a MS SQL Server database running them inside the rpm check phase isn't going to make much sense.

I can certainly build the documentation and add it to a doc package and fix the description formatting.

Comment 13 Miroslav Suchý 2016-09-14 13:34:31 UTC
> Are the py2_build/py3_build and py2_install/py3_install macros supported by the EPEL buildroots?

They are for sure for EPEL7. I did not try others.

> Unfortunately as the unit tests for this project require access to a MS SQL Server database running them inside the rpm check phase isn't going to make much sense.

fair enough

> I can certainly build the documentation and add it to a doc package and fix the description formatting.

No need to build it. It is already in tar file. So just add those lines I mentioned.

Can you upload updated spec and src.rpm?

Comment 14 Miroslav Suchý 2017-06-09 07:34:02 UTC
Ping. Any progress here?

Comment 15 Mohamed El Morabity 2017-07-21 08:46:06 UTC
Looks like the review is stalled :(. I'm really interested in making pymssql available for Fedora and EPEL. Can this review be set as dead?

Comment 16 Mohamed El Morabity 2017-10-04 11:59:13 UTC
Closing the review as stated in https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews

Comment 17 Mohamed El Morabity 2017-10-04 12:04:05 UTC

*** This bug has been marked as a duplicate of bug 1498472 ***


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