From 247fa1476078d82279892b3214ee8dc2ccb2442e878fc5d74901905ce8203498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 22 Aug 2018 07:27:47 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + pyodbc-4.0.24.tar.gz | 3 ++ python-pyodbc.changes | 102 ++++++++++++++++++++++++++++++++++++++++++ python-pyodbc.spec | 52 +++++++++++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pyodbc-4.0.24.tar.gz create mode 100644 python-pyodbc.changes create mode 100644 python-pyodbc.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pyodbc-4.0.24.tar.gz b/pyodbc-4.0.24.tar.gz new file mode 100644 index 0000000..cbeb5f0 --- /dev/null +++ b/pyodbc-4.0.24.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52b67e2d10167f7350b469bd691af731774a654d381273e6a9d5d23f453f79e2 +size 211365 diff --git a/python-pyodbc.changes b/python-pyodbc.changes new file mode 100644 index 0000000..f123dcb --- /dev/null +++ b/python-pyodbc.changes @@ -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 + diff --git a/python-pyodbc.spec b/python-pyodbc.spec new file mode 100644 index 0000000..b71771e --- /dev/null +++ b/python-pyodbc.spec @@ -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