summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Klimov <bloodjazman@gmail.com>2014-04-02 21:34:18 +0600
committerEugene Klimov <bloodjazman@gmail.com>2014-04-02 21:34:18 +0600
commit0e6c9f498c1296e47cfde1aae0378cfae893917d (patch)
tree3eed637d5c4a16ee99c7c543a0c8af8a5e31e12e
parente0832df6f234aed3abed48beed44768563c5689b (diff)
downloadyoyo-0e6c9f498c1296e47cfde1aae0378cfae893917d.tar.gz
adding support ODBC connection schema, dos2unix recode setup.py
-rw-r--r--setup.py108
-rw-r--r--yoyo/connections.py2
2 files changed, 55 insertions, 55 deletions
diff --git a/setup.py b/setup.py
index 2e0a099..414921d 100644
--- a/setup.py
+++ b/setup.py
@@ -1,54 +1,54 @@
-#!/usr/bin/env python
-
-import os
-import re
-from setuptools import setup, find_packages
-
-VERSIONFILE = "yoyo/__init__.py"
-install_requires = []
-
-
-def get_version():
- with open(VERSIONFILE, 'rb') as f:
- return re.search("^__version__\s*=\s*['\"]([^'\"]*)['\"]",
- f.read().decode('UTF-8'), re.M).group(1)
-
-try:
- import argparse # NOQA
-except ImportError:
- install_requires.append('argparse')
-
-
-def read(*path):
- """
- Return content from ``path`` as a string
- """
- with open(os.path.join(os.path.dirname(__file__), *path), 'rb') as f:
- return f.read().decode('UTF-8')
-
-
-setup(
- name='yoyo-migrations',
- version=get_version(),
- description='Database schema migration tool using SQL and DB-API',
- long_description=read('README.rst') + '\n\n' + read('CHANGELOG.rst'),
- author='Oliver Cope',
- author_email='oliver@redgecko.org',
- license='BSD',
- packages=find_packages(),
- include_package_data=True,
- zip_safe=False,
- install_requires=install_requires,
- extras_require={
- 'mysql': ['mysql-python'],
- 'postgres': ['psycopg2'],
- 'pyodbc': ['pyodbc'],
- 'sqlite3': ['db-sqlite3']
- },
- tests_require=['db-sqlite3', 'mock'],
- entry_points={
- 'console_scripts': [
- 'yoyo-migrate=yoyo.scripts.migrate:main'
- ],
- }
-)
+#!/usr/bin/env python
+
+import os
+import re
+from setuptools import setup, find_packages
+
+VERSIONFILE = "yoyo/__init__.py"
+install_requires = []
+
+
+def get_version():
+ with open(VERSIONFILE, 'rb') as f:
+ return re.search("^__version__\s*=\s*['\"]([^'\"]*)['\"]",
+ f.read().decode('UTF-8'), re.M).group(1)
+
+try:
+ import argparse # NOQA
+except ImportError:
+ install_requires.append('argparse')
+
+
+def read(*path):
+ """
+ Return content from ``path`` as a string
+ """
+ with open(os.path.join(os.path.dirname(__file__), *path), 'rb') as f:
+ return f.read().decode('UTF-8')
+
+
+setup(
+ name='yoyo-migrations',
+ version=get_version(),
+ description='Database schema migration tool using SQL and DB-API',
+ long_description=read('README.rst') + '\n\n' + read('CHANGELOG.rst'),
+ author='Oliver Cope',
+ author_email='oliver@redgecko.org',
+ license='BSD',
+ packages=find_packages(),
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=install_requires,
+ extras_require={
+ 'mysql': ['mysql-python'],
+ 'postgres': ['psycopg2'],
+ 'pyodbc': ['pyodbc'],
+ 'sqlite3': ['db-sqlite3']
+ },
+ tests_require=['db-sqlite3', 'mock'],
+ entry_points={
+ 'console_scripts': [
+ 'yoyo-migrate=yoyo.scripts.migrate:main'
+ ],
+ }
+)
diff --git a/yoyo/connections.py b/yoyo/connections.py
index 917c0db..01775d6 100644
--- a/yoyo/connections.py
+++ b/yoyo/connections.py
@@ -83,7 +83,7 @@ def connect_postgres(username, password, host, port, database, db_params):
def connect(uri):
"""
- Connect to the given DB uri (in the format
+ Connect to the given DB uri in the format
``driver://user:pass@host:port/database_name?param=value``, returning a DB-API connection
object and the paramstyle used by the DB-API module.
"""