浏览代码

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

Adrien Panay 8 年前
父节点
当前提交
6342ee79c7
共有 6 个文件被更改,包括 36 次插入21 次删除
  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 查看文件

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"
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
   - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE tracim_test;'; fi"
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
   - sh -c "if [ '$DB' = 'sqlite' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\sqlite:\/\/\/tracim_test.sqlite/\" test.ini; fi"
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
   - sh -c "if [ '$DB' = 'sqlite' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/<replace_database_uri_here>/sqlite:\/\/\/tracim.sqlite/\" development.ini; fi"
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 查看文件

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
 # Tracim - Introduction #
3
 # Tracim - Introduction #
4
 
4
 
67
 
67
 
68
 Tracim is a web application:
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
 * based on the [TurboGears](http://www.turbogears.org/) web framework.
71
 * based on the [TurboGears](http://www.turbogears.org/) web framework.
72
 * relying on [PostgreSQL](http://www.postgresql.org/) or [MySQL](https://www.mysql.fr/) or [sqlite](https://www.sqlite.org/) as the storage engine.
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
 
138
 
139
 Or if you want to use MySQL as database engine
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
 Or if you want to use SQLite as database engine
143
 Or if you want to use SQLite as database engine
144
 
144
 
163
 
163
 
164
 ### Setting-up python virtualenv ###
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
 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:
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
     cd tracim && python setup.py develop && cd -
178
     cd tracim && python setup.py develop && cd -
179
     pip install -r install/requirements.txt
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
 ## Database Setup ##
181
 ## Database Setup ##
184
 
182
 
185
 ### Minimalist introduction to PostgreSQL ###
183
 ### Minimalist introduction to PostgreSQL ###
257
 
255
 
258
 ### Minimalist introduction to MySQL ###
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
 Connect to mysql with root user (password has been set at "Installation" -> "Dependencies" chapter, when installing package)
267
 Connect to mysql with root user (password has been set at "Installation" -> "Dependencies" chapter, when installing package)
263
 
268
 
304
 
309
 
305
     sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb?client_encoding=utf8
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
 There is an example value for SQLite below :
316
 There is an example value for SQLite below :
312
 
317
 
421
 
426
 
422
 The last step before to run the application is to initialize the database schema. This is done through the following command:
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
     cd tracim && gearbox setup-app && cd -
429
     cd tracim && gearbox setup-app && cd -
427
 
430
 
428
 ## Running the server ##
431
 ## Running the server ##

+ 3 - 2
install/requirements.txt 查看文件

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

+ 2 - 1
tracim/development.ini.base 查看文件

94
 # invalidate the URI when specifying a SQLite db via path name
94
 # invalidate the URI when specifying a SQLite db via path name
95
 # sqlalchemy.url=postgresql://username:password@hostname:port/databasename
95
 # sqlalchemy.url=postgresql://username:password@hostname:port/databasename
96
 # sqlalchemy.url=mysql://username:password@hostname:port/databasename
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
 sqlalchemy.url = <replace_database_uri_here>
99
 sqlalchemy.url = <replace_database_uri_here>
99
 
100
 
100
 #echo shouldn't be used together with the logging module.
101
 #echo shouldn't be used together with the logging module.

+ 9 - 1
tracim/setup.py 查看文件

25
     use_setuptools()
25
     use_setuptools()
26
     from setuptools import setup, find_packages
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
 testpkgs=['WebTest >= 1.2.3',
36
 testpkgs=['WebTest >= 1.2.3',
29
                'nose',
37
                'nose',
30
                'coverage',
38
                'coverage',
39
     "sqlalchemy",
47
     "sqlalchemy",
40
     "alembic",
48
     "alembic",
41
     "repoze.who",
49
     "repoze.who",
42
-    "who-ldap==3.1.0",
50
+    "who_ldap>=3.2.1",
43
     "python-ldap-test==0.2.1",
51
     "python-ldap-test==0.2.1",
44
     "unicode-slugify==0.1.3",
52
     "unicode-slugify==0.1.3",
45
     "pytz==2014.7",
53
     "pytz==2014.7",

+ 6 - 3
tracim/test.ini 查看文件

22
 port = 8080
22
 port = 8080
23
 
23
 
24
 [app:main]
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
 use = config:development.ini
27
 use = config:development.ini
27
 
28
 
28
 [app:main_without_authn]
29
 [app:main_without_authn]
30
 skip_authentication = True
31
 skip_authentication = True
31
 
32
 
32
 [app:ldap]
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
 auth_type = ldap
36
 auth_type = ldap
35
 ldap_url = ldap://localhost:3333
37
 ldap_url = ldap://localhost:3333
36
 ldap_base_dn = dc=directory,dc=fsf,dc=org
38
 ldap_base_dn = dc=directory,dc=fsf,dc=org
49
 use = config:development.ini
51
 use = config:development.ini
50
 
52
 
51
 [app:radicale]
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
 use = config:development.ini
57
 use = config:development.ini
55
 
58