1
0
forked from pool/python-pyodbc

Accepting request 630807 from home:Monex:Database

I've also added the previous suggested changes to the spec file, but I've found not a really good solution for the %check section. The problem is, that the library path is hard-coded and expects everything inside the build directory. So solve this I rename the build directory between the different test runs. I hope this will be ok or if you have a better solution I will try to add this.

The failed sqlite tests are fixed in the upstream project and a new version was released.

OBS-URL: https://build.opensuse.org/request/show/630807
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyodbc?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2018-08-22 07:27:47 +00:00
committed by Git OBS Bridge
commit 247fa14760
5 changed files with 181 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
pyodbc-4.0.24.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52b67e2d10167f7350b469bd691af731774a654d381273e6a9d5d23f453f79e2
size 211365

102
python-pyodbc.changes Normal file
View File

@@ -0,0 +1,102 @@
-------------------------------------------------------------------
Sun Aug 19 09:54:09 UTC 2018 - monex@liquid-co.de
- Update to 4.0.24
-------------------------------------------------------------------
Thu Aug 9 18:39:28 UTC 2018 - monex@liquid-co.de
- Added test cases for sqlite to check section.
Unfortunaly the test cases are broken at the moment
a bug report was created at github.
-------------------------------------------------------------------
Sun Aug 5 17:44:33 UTC 2018 - monex@liquid-co.de
- Added LICENSE.txt and README.md to files.
- Use only one BuildRequires per line.
- Corrected wrong Release version.
-------------------------------------------------------------------
Sat Aug 4 16:11:03 UTC 2018 - monex@liquid-co.de
- Corrected source url.
- Added sources again.
- Fix Url to upstream project.
-------------------------------------------------------------------
Sat Aug 4 16:00:07 UTC 2018 - monex@liquid-co.de
- Remove unneeded source because it is fetched automatically.
-------------------------------------------------------------------
Fri Aug 3 20:12:59 UTC 2018 - 2monex@gmx.net
- Use URL as source according to python packaginf guidelines.
-------------------------------------------------------------------
Fri Aug 3 09:52:50 UTC 2018 - nrochard@gmail.com
- Update to version 4.0.23
-------------------------------------------------------------------
Thu Jun 28 18:18:40 UTC 2018 - monex@liquid-co.de
- Use python single spec.
-------------------------------------------------------------------
Mon Feb 27 19:45:51 UTC 2017 - monex@liquid-co.de
-Update to version 4.0.13
-------------------------------------------------------------------
Sat May 2 18:50:07 UTC 2015 - monex@liquid-co.de
- added missing source file
-------------------------------------------------------------------
Sat May 2 18:46:44 UTC 2015 - monex@liquid-co.de
- updated to version 3.0.10
-------------------------------------------------------------------
Sun Aug 4 19:28:00 UTC 2013 - monex@liquid-co.de
- updated to version 3.0.7
* Added context manager support to Cursor
* Added padding for driver bugs writing an extra byte
* Cursor.executemany now accepts an iterator or generator.
* Compilation improvements for FreeBSD, Cygwin, and OS/X
* Use SQL_DATA_AT_EXEC instead of SQL_DATA_LEN_AT_EXEC when possible for driver compatibility.
* Row objects can now be pickled.
-------------------------------------------------------------------
Fri Nov 16 21:07:43 UTC 2012 - 2monex@gmx.net
- change source file compression
-------------------------------------------------------------------
Fri Nov 16 20:58:42 UTC 2012 - 2monex@gmx.net
- updated to version 3.0.6
* Fixed building on Python 2.5. Other versions are not affected.
* Fixed "function sequence" errors caused by prepared SQL not being cleared ("unprepared")
when a catalog function is executed.
* Added Cursor.commit() and Cursor.rollback(). It is now possible to use only a cursor in
your code instead of keeping track of a connection and a cursor.
* Added readonly keyword to connect. If set to True, SQLSetConnectAttr
SQL_ATTR_ACCESS_MODE is set to SQL_MODE_READ_ONLY.
This may provide better locking semantics or speed for some drivers.
* Fixed an error reading SQL Server XML data types longer than 4K.
-------------------------------------------------------------------
Mon Jun 4 20:10:47 UTC 2012 - monex@liquid-co.de
- removed unneded requires
-------------------------------------------------------------------
Mon Jun 4 20:04:40 UTC 2012 - monex@liquid-co.de
- initial version

52
python-pyodbc.spec Normal file
View File

@@ -0,0 +1,52 @@
#
# spec file for package python-pyodbc
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyodbc
Version: 4.0.24
Release: 0
Url: https://github.com/mkleehammer/pyodbc
Summary: Python ODBC API
License: MIT
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pyodbc/pyodbc-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: unixODBC-devel
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros
BuildRequires: sqliteodbc
%python_subpackages
%description
pyodbc is a Python 2.x and 3.x module that allows you to use ODBC
to connect to almost any database from Windows, Linux, OS/X, and more.
It implements the Python Database API Specification v2.0, but additional features
have been added to simplify database programming even more.
%prep
%setup -q -n pyodbc-%{version}
%build
%python_build
%install
%python_install
%check
python3 tests3/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db"
mv build/ _build.python3/ && mv _build.python2/ build/
python2 tests2/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db"
mv build/ _build.python2/ && mv _build.python3/ build/
%files %python_files
%defattr(-,root,root,-)
%{python_sitearch}/*
%license LICENSE.txt
%doc README.md
%changelog