Browse Source

Merge branch 'fix/_/python_3.5_3.6'

Adrien Panay 7 years ago
parent
commit
6342ee79c7
6 changed files with 36 additions and 21 deletions
  1. 2 3
      .travis.yml
  2. 14 11
      README.md
  3. 3 2
      install/requirements.txt
  4. 2 1
      tracim/development.ini.base
  5. 9 1
      tracim/setup.py
  6. 6 3
      tracim/test.ini

+ 2 - 3
.travis.yml View File

@@ -25,9 +25,8 @@ before_script:
25 25
   - sh -c "if [ '$DB' = 'postgres' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\1postgresql:\/\/postgres:dummy@127.0.0.1:5432\/tracim_test?client_encoding=utf8/\" development.ini; fi"
26 26
 
27 27
   - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE tracim_test;'; fi"
28
-  - sh -c "if [ '$DB' = 'mysql' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\mysql+oursql:\/\/root@localhost\/tracim_test/\" test.ini; fi"
29
-  - sh -c "if [ '$DB' = 'mysql' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/<replace_database_uri_here>/mysql+oursql:\/\/root@localhost\/tracim_test/\" development.ini; fi"
30
-  - sh -c "if [ '$DB' = 'mysql' ]; then pip install https://launchpad.net/oursql/py3k/py3k-0.9.4/+download/oursql-0.9.4.zip; fi"
28
+  - sh -c "if [ '$DB' = 'mysql' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\mysql+pymysql:\/\/root@localhost\/tracim_test/\" test.ini; fi"
29
+  - sh -c "if [ '$DB' = 'mysql' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/<replace_database_uri_here>/mysql+pymysql:\/\/root@localhost\/tracim_test/\" development.ini; fi"
31 30
 
32 31
   - sh -c "if [ '$DB' = 'sqlite' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\sqlite:\/\/\/tracim_test.sqlite/\" test.ini; fi"
33 32
   - sh -c "if [ '$DB' = 'sqlite' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/<replace_database_uri_here>/sqlite:\/\/\/tracim.sqlite/\" development.ini; fi"

+ 14 - 11
README.md View File

@@ -1,4 +1,4 @@
1
-[![Build Status](https://travis-ci.org/tracim/tracim.svg?branch=master)](https://travis-ci.org/tracim/tracim) [![Coverage Status](https://img.shields.io/coveralls/tracim/tracim.svg)](https://coveralls.io/r/tracim/tracim) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tracim/tracim/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tracim/tracim/?branch=master)
1
+[![Build Status](https://travis-ci.org/tracim/tracim.svg?branch=master)](https://travis-ci.org/tracim/tracim) [![Coverage Status](https://img.shields.io/coveralls/tracim/tracim.svg)](https://coveralls.io/r/tracim/tracim) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tracim/tracim/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tracim/tracim/?branch=master) [![PyPI](https://img.shields.io/pypi/pyversions/tracim.svg)](https://pypi.python.org/pypi/tracim)
2 2
 
3 3
 # Tracim - Introduction #
4 4
 
@@ -67,7 +67,7 @@ Tracim is licensed under the terms of the
67 67
 
68 68
 Tracim is a web application:
69 69
 
70
-* developed with python >=3.4.
70
+* developed with python 3.4, 3.5, 3.6
71 71
 * based on the [TurboGears](http://www.turbogears.org/) web framework.
72 72
 * relying on [PostgreSQL](http://www.postgresql.org/) or [MySQL](https://www.mysql.fr/) or [sqlite](https://www.sqlite.org/) as the storage engine.
73 73
 
@@ -138,7 +138,7 @@ If you want use PostgreSQL as database engine:
138 138
 
139 139
 Or if you want to use MySQL as database engine
140 140
 
141
-    apt-get install mysql-server mysql-client libmysqlclient-dev
141
+    apt-get install mysql-server
142 142
 
143 143
 Or if you want to use SQLite as database engine
144 144
 
@@ -163,7 +163,7 @@ To install frontend dependencies listed in the file package.json, proceed as fol
163 163
 
164 164
 ### Setting-up python virtualenv ###
165 165
 
166
-_Reminder : Tracim is developed and tested using python3.4._
166
+_Reminder : Tracim is developed and tested using python3.4, python3.5, python3.6._
167 167
 
168 168
 We strongly recommend to use virtualenv as deployment environment. This ensure that there will be no conflict between system-wide python installation and Tracim required ones. To Create the virtual environment:
169 169
 
@@ -178,8 +178,6 @@ To install tracim and it's dependencies:
178 178
     cd tracim && python setup.py develop && cd -
179 179
     pip install -r install/requirements.txt
180 180
 
181
-**Note**: If you want to use MySQL database, please refer to Configuration/database schema note to install required package.
182
-
183 181
 ## Database Setup ##
184 182
 
185 183
 ### Minimalist introduction to PostgreSQL ###
@@ -257,7 +255,14 @@ In this case, delete the user and database you previously created (using pgtool)
257 255
 
258 256
 ### Minimalist introduction to MySQL ###
259 257
 
260
-## Create database ##
258
+#### Driver ####
259
+
260
+Tracim uses the PyMySQL driver between the SQLAlchemy ORM and the MySQL RDBMS.
261
+The only requirement is a pip installable package:
262
+
263
+    pip install PyMySQL
264
+
265
+#### Create database ####
261 266
 
262 267
 Connect to mysql with root user (password has been set at "Installation" -> "Dependencies" chapter, when installing package)
263 268
 
@@ -304,9 +309,9 @@ Configure database in the development.ini file. This is defined as sqlalchemy.ur
304 309
 
305 310
     sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb?client_encoding=utf8
306 311
 
307
-There is an example value for MySQL below (please refer to Configuration/database schema note to install required package):
312
+There is an example value for MySQL below:
308 313
 
309
-    sqlalchemy.url = mysql+oursql://tracimuser:tracimpassword@127.0.0.1/tracimdb
314
+    sqlalchemy.url = mysql+pymysql://tracimuser:tracimpassword@127.0.0.1/tracimdb
310 315
 
311 316
 There is an example value for SQLite below :
312 317
 
@@ -421,8 +426,6 @@ or
421 426
 
422 427
 The last step before to run the application is to initialize the database schema. This is done through the following command:
423 428
 
424
-**Note**: If you want to use MySQL database, please install this pip package: ```pip install https://launchpad.net/oursql/py3k/py3k-0.9.4/+download/oursql-0.9.4.zip```
425
-
426 429
     cd tracim && gearbox setup-app && cd -
427 430
 
428 431
 ## Running the server ##

+ 3 - 2
install/requirements.txt View File

@@ -40,7 +40,7 @@ python-dateutil==2.5.3
40 40
 python-editor==1.0.1
41 41
 python-ldap-test==0.2.1
42 42
 repoze.lru==0.6
43
-repoze.who==2.2
43
+repoze.who==2.3
44 44
 requests==2.10.0
45 45
 six==1.8.0
46 46
 speaklater==1.3
@@ -57,7 +57,7 @@ tw2.forms==2.2.2.1
57 57
 unicode-slugify==0.1.3
58 58
 vobject==0.9.2
59 59
 waitress==0.8.9
60
-who-ldap==3.1.0
60
+who_ldap==3.2.2
61 61
 -e git+https://github.com/algoo/wsgidav.git@py3#egg=wsgidav
62 62
 zope.interface==4.1.3
63 63
 zope.sqlalchemy==0.7.6
@@ -66,3 +66,4 @@ redis==2.10.5
66 66
 typing==3.5.3.0
67 67
 rq==0.7.1
68 68
 click==6.7
69
+PyMySQL==0.7.11

+ 2 - 1
tracim/development.ini.base View File

@@ -94,7 +94,8 @@ beaker.session.validate_key = 3283411b-1904-4554-b0e1-883863b53080
94 94
 # invalidate the URI when specifying a SQLite db via path name
95 95
 # sqlalchemy.url=postgresql://username:password@hostname:port/databasename
96 96
 # sqlalchemy.url=mysql://username:password@hostname:port/databasename
97
-# sqlalchemy.url = postgresql://tracim_user:tracim_user_password@127.0.0.1:5432/tracim?client_encoding=utf8
97
+# sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb?client_encoding=utf8
98
+# sqlalchemy.url = mysql+pymysql://tracimuser:tracimpassword@127.0.0.1/tracimdb
98 99
 sqlalchemy.url = <replace_database_uri_here>
99 100
 
100 101
 #echo shouldn't be used together with the logging module.

+ 9 - 1
tracim/setup.py View File

@@ -25,6 +25,14 @@ except ImportError:
25 25
     use_setuptools()
26 26
     from setuptools import setup, find_packages
27 27
 
28
+classifiers = [
29
+    "License :: OSI Approved :: GNU Affero General Public License v3",
30
+    "Programming Language :: Python",
31
+    "Programming Language :: Python :: 3.4",
32
+    "Programming Language :: Python :: 3.5",
33
+    "Programming Language :: Python :: 3.6",
34
+]
35
+
28 36
 testpkgs=['WebTest >= 1.2.3',
29 37
                'nose',
30 38
                'coverage',
@@ -39,7 +47,7 @@ install_requires=[
39 47
     "sqlalchemy",
40 48
     "alembic",
41 49
     "repoze.who",
42
-    "who-ldap==3.1.0",
50
+    "who_ldap>=3.2.1",
43 51
     "python-ldap-test==0.2.1",
44 52
     "unicode-slugify==0.1.3",
45 53
     "pytz==2014.7",

+ 6 - 3
tracim/test.ini View File

@@ -22,7 +22,8 @@ host = 127.0.0.1
22 22
 port = 8080
23 23
 
24 24
 [app:main]
25
-sqlalchemy.url =  postgresql://postgres:dummy@127.0.0.1:5432/tracim_test?client_encoding=utf8
25
+sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb_test?client_encoding=utf8
26
+# sqlalchemy.url = mysql+pymysql://tracimuser:tracimpassword@127.0.0.1/tracimdb_test
26 27
 use = config:development.ini
27 28
 
28 29
 [app:main_without_authn]
@@ -30,7 +31,8 @@ use = main
30 31
 skip_authentication = True
31 32
 
32 33
 [app:ldap]
33
-sqlalchemy.url =  postgresql://postgres:dummy@127.0.0.1:5432/tracim_test?client_encoding=utf8
34
+sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb_test?client_encoding=utf8
35
+# sqlalchemy.url = mysql+pymysql://tracimuser:tracimpassword@127.0.0.1/tracimdb_test
34 36
 auth_type = ldap
35 37
 ldap_url = ldap://localhost:3333
36 38
 ldap_base_dn = dc=directory,dc=fsf,dc=org
@@ -49,7 +51,8 @@ resetpassword.smtp_passwd =  fake
49 51
 use = config:development.ini
50 52
 
51 53
 [app:radicale]
52
-sqlalchemy.url =  postgresql://postgres:dummy@127.0.0.1:5432/tracim_test?client_encoding=utf8
54
+sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb_test?client_encoding=utf8
55
+# sqlalchemy.url = mysql+pymysql://tracimuser:tracimpassword@127.0.0.1/tracimdb_test
53 56
 
54 57
 use = config:development.ini
55 58