[SQL-CVS] SQLObject development repository branch master updated. 3.5.0-4-g7453dbc
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <no...@so...> - 2017-12-10 11:57:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SQLObject development repository". The branch, master has been updated via 7453dbc816d194e7ed3336ef5123aa4b05d39126 (commit) via 3db1182c8c02635ad5b6e4c950f63ceb21120e2d (commit) from 76b658299f6eb4b1abc63fac228bd9b5d28cd594 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://sourceforge.net/p/sqlobject/sqlobject/ci/7453dbc816d194e7ed3336ef5123aa4b05d39126 commit 7453dbc816d194e7ed3336ef5123aa4b05d39126 Author: Oleg Broytman <ph...@ph...> Date: Sun Dec 10 14:02:07 2017 +0300 Build(setup.py): Use python_requires keyword diff --git a/docs/News.rst b/docs/News.rst index 3a80743..312aba0 100644 --- a/docs/News.rst +++ b/docs/News.rst @@ -17,6 +17,8 @@ Build ``install_requires`` and ``extras_require`` declarative. This makes the universal wheel truly universal. +* Use ``python_requires`` keyword in ``setup.py``. + SQLObject 3.5.0 =============== diff --git a/setup.py b/setup.py index 66fdb23..2adc4ab 100755 --- a/setup.py +++ b/setup.py @@ -66,6 +66,8 @@ if is_setuptools: 'sybase': ['Sybase'], } + kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' + setup(name="SQLObject", version=version, description="Object-Relational Manager, aka database wrapper", http://sourceforge.net/p/sqlobject/sqlobject/ci/3db1182c8c02635ad5b6e4c950f63ceb21120e2d commit 3db1182c8c02635ad5b6e4c950f63ceb21120e2d Author: Oleg Broytman <ph...@ph...> Date: Sun Dec 10 13:55:44 2017 +0300 Build(setup.py): Use python_version environment marker Use ``python_version`` environment marker in ``setup.py`` to make ``install_requires`` and ``extras_require`` declarative. This makes the universal wheel truly universal. diff --git a/docs/News.rst b/docs/News.rst index bb0d044..3a80743 100644 --- a/docs/News.rst +++ b/docs/News.rst @@ -10,6 +10,13 @@ News SQLObject 3.6.0 (master) ======================== +Build +===== + +* Use ``python_version`` environment marker in ``setup.py`` to make + ``install_requires`` and ``extras_require`` declarative. This makes + the universal wheel truly universal. + SQLObject 3.5.0 =============== diff --git a/setup.py b/setup.py index 8c2d6e3..66fdb23 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import sys from imp import load_source from os.path import abspath, dirname, join @@ -27,21 +26,13 @@ if is_setuptools: [paste.filter_app_factory] main = sqlobject.wsgi_middleware:make_middleware """ - if (sys.version_info[:2] == (2, 7)): - PY2 = True - elif (sys.version_info[0] == 3) and (sys.version_info[:2] >= (3, 4)): - PY2 = False - else: - raise ImportError("SQLObject requires Python 2.7 or 3.4+") - - kw['install_requires'] = install_requires = [] - if PY2: - install_requires.append("FormEncode>=1.1.1,!=1.3.0") - else: - install_requires.append("FormEncode>=1.3.1") - install_requires.append("PyDispatcher>=2.0.4") - - kw['extras_require'] = extras_require = { + kw['install_requires'] = [ + "FormEncode>=1.1.1,!=1.3.0; python_version=='2.7'", + "FormEncode>=1.3.1; python_version>='3.4'", + "PyDispatcher>=2.0.4", + ] + + kw['extras_require'] = { # Firebird/Interbase 'fdb': ['fdb'], 'firebirdsql': ['firebirdsql'], @@ -50,7 +41,10 @@ if is_setuptools: 'adodbapi': ['adodbapi'], 'pymssql': ['pymssql'], # MySQL + 'mysql:python_version=="2.7"': ['MySQL-python'], + 'mysql:python_version>="3.4"': ['mysqlclient'], 'mysql-connector': ['mysql-connector'], + 'oursql:python_version=="2.7"': ['oursql'], 'pymysql': ['pymysql'], # ODBC 'odbc': ['pyodbc'], @@ -71,11 +65,6 @@ if is_setuptools: 'sqlite': ['pysqlite'], 'sybase': ['Sybase'], } - if PY2: - extras_require['mysql'] = ['MySQLdb'] - extras_require['oursql'] = ['oursql'] - else: - extras_require['mysql'] = ['mysqlclient'] setup(name="SQLObject", version=version, ----------------------------------------------------------------------- Summary of changes: docs/News.rst | 9 +++++++++ setup.py | 33 ++++++++++++--------------------- 2 files changed, 21 insertions(+), 21 deletions(-) hooks/post-receive -- SQLObject development repository |