Skip to content

Commit f28302c

Browse files
committed
updated based on the comments in pull request #46.
Cleaned up travis, and setup.py uses requirements.txt (pip.parserequirements)
1 parent 6e681f7 commit f28302c

File tree

4 files changed

+39
-79
lines changed

4 files changed

+39
-79
lines changed

.travis.yml

Lines changed: 13 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -21,61 +21,21 @@ services:
2121
#addons:
2222
# mariadb: '10.1'
2323
before_install:
24-
# - strace mysql 2>&1 | grep cnf
25-
#stat("/etc/my.cnf", 0x7ffef7c8dca0) = -1 ENOENT (No such file or directory)
26-
#stat("/etc/mysql/my.cnf", {st_mode=S_IFREG|0644, st_size=5232, ...}) = 0
27-
#open("/etc/mysql/my.cnf", O_RDONLY|O_CLOEXEC) = 3
28-
#stat("/etc/mysql/conf.d/mariadb.cnf", {st_mode=S_IFREG|0644, st_size=435, ...}) = 0
29-
#open("/etc/mysql/conf.d/mariadb.cnf", O_RDONLY|O_CLOEXEC) = 4
30-
#stat("/etc/mysql/conf.d/mysqld_safe_syslog.cnf", {st_mode=S_IFREG|0644, st_size=36, ...}) = 0
31-
#open("/etc/mysql/conf.d/mysqld_safe_syslog.cnf", O_RDONLY|O_CLOEXEC) = 4
32-
#stat("/etc/mysql/conf.d/tokudb.cnf", {st_mode=S_IFREG|0644, st_size=285, ...}) = 0
33-
#open("/etc/mysql/conf.d/tokudb.cnf", O_RDONLY|O_CLOEXEC) = 4
34-
#stat("/home/travis/.my.cnf", 0x7ffef7c8dca0) = -1 ENOENT (No such file or directory)
35-
# - ls -l /etc/mariadb
36-
- mysqld --help --verbose
37-
- mysql -uroot -e 'SHOW VARIABLES WHERE Variable_Name LIKE "%dir"'
38-
# Default options are read from the following files in the given order:
39-
# /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
40-
# - ls -al .my.cnf
41-
# - ls -al /etc/my.cnf
42-
- ls -al /etc/mysql/conf.d/
43-
- ls -al /etc/mysql/
44-
# - ls -al /var/lib/mysql
45-
# - ls -al /usr/local/etc/my.cnf.d/
46-
# - cat /etc/mysql/conf.d/mariadb.cnf
47-
# - cat /etc/mysql/conf.d/tokudb.cnf
48-
# - cat /etc/mysql/conf.d/mysqld_safe_syslog.cnf
49-
- cat /etc/mysql/debian-start
50-
- cat /usr/share/mysql/debian-start.inc.sh
51-
- cat /etc/init.d/mysql
52-
- sudo cat /etc/mysql/debian.cnf
53-
# - cat /etc/apparmor.d/usr.sbin.mysqld
54-
- ls -al /etc/mysql
24+
- ls -al /etc/mysql
5525
- sudo service mysql stop
56-
# - echo "[mysqld]" > /etc/my.cnf
57-
# - echo "lower_case_table_names = 1" >> /etc/my.cnf
58-
# - sudo echo "[mariadb-10.0]" >> /etc/my.cnf
59-
# - sudo echo "lower_case_table_names = 1" >> /etc/my.cnf
26+
# lower-case-table-names = 1 leaving lower_case_table_names=1 since that is what the docs say
6027
- echo "[mysqld]" > $HOME/.my.cnf
6128
- echo "lower-case-table-names = 1" >> $HOME/.my.cnf
6229
# - echo "lower_case_table_names=1" >> $HOME/.my.cnf
63-
- cat $HOME/.my.cnf
64-
# - echo "[mariadb-10.0]" >> .my.cnf
65-
# - echo "lower_case_table_names = 1" >> .my.cnf
66-
# - sudo echo "[mysqld]" >> /etc/mysql/debian.cnf
67-
# - sudo echo "lower_case_table_names = 2" >> /etc/mysql/debian.cnf
30+
- cat $HOME/.my.cnf # be sure it registered
6831
- service --status-all
69-
# - sudo cat /etc/mysql/debian.cnf
70-
# - sudo echo "[mysqld]" >> /etc/mysql/debian.cnf
71-
# - sudo echo "lower_case_table_names=1" >> /etc/mysql/debian.cnf
72-
- sudo cat /etc/mysql/debian.cnf
73-
- sudo sed -i '/\[mysqld\]/a lower_case_table_names = 1 ' /etc/mysql/my.cnf
74-
- cat /etc/mysql/my.cnf
75-
- sudo service mysql start
76-
# - sudo service mysql restart
32+
# this should have worked.
33+
# - sudo sed -i '/\[mysqld\]/a lower_case_table_names = 1 ' /etc/mysql/my.cnf
34+
# - cat /etc/mysql/my.cnf
35+
- sudo service mysql start restart
7736
- mysql --verbose -e "show variables like 'lower%';" --user=root
78-
# - strace mysql 2>&1 | grep cnf
37+
38+
# - strace mysql 2>&1 | grep cnf # will tell you what files are being used
7939
- mysql --verbose -e "CREATE USER 'ODM'@'localhost' IDENTIFIED BY 'odm';GRANT ALL PRIVILEGES ON *.* TO 'ODM'@'localhost';" --user=root
8040
- mysql --verbose -e "CREATE USER 'ODM'@'127.0.0.1' IDENTIFIED BY 'odm';GRANT ALL PRIVILEGES ON *.* TO 'ODM'@'127.0.0.1';" --user=root
8141
- mysql --verbose -e "CREATE USER 'ODM'@'%' IDENTIFIED BY 'odm';GRANT ALL PRIVILEGES ON *.* TO 'ODM'@'%';" --user=root
@@ -154,25 +114,20 @@ install: # now just our code
154114
- ls -al ./tests/usecasesql/littlebearriver/sampledatabases/odm2_mysql/LBR_MySQL_SmallExample.sql ./tests/usecasesql/marchantariats/marchantariats.sql
155115
- mysql --user=ODM --password=odm odm2 < ./tests/usecasesql/littlebearriver/sampledatabases/odm2_mysql/LBR_MySQL_SmallExample.sql
156116
- mysql --user=root -e "show databases;"
157-
- mysql --user=root -e "select table_schema,table_name,table_rows from information_schema.tables;"
158117
- mysql --user=root -e "GRANT ALL PRIVILEGES ON odm2.* TO 'ODM'@'localhost';FLUSH PRIVILEGES;"
118+
# these should all work, if they don't the lower_case_table_names failed
159119
- mysql --user=ODM --password=odm odm2 -e "use odm2; Select * from Variables;"
160-
- mysql --user=ODM --password=odm odm2 -e "use odm2; Select * from variables;"
161-
# - mysql --user=ODM --password=odm odm2 -e "Select * from odm2.Variables;"
120+
- mysql --user=ODM --password=odm odm2 -e "Select * from odm2.Variables;"
162121
- mysql --user=ODM --password=odm -e "Select * from odm2.Variables;"
163-
- mysql --user=ODM --password=odm -e "Select * from odm2.variables;"
164122
# add -a to psql to see full log, -q is quiet
165123
- psql -U postgres -q -f ./tests/usecasesql/marchantariats/marchantariats.sql
166-
# - netstat output | grep mysql
167-
- mysql --user root -e "SELECT User, Host FROM mysql.user;"
124+
168125

169126
# don't forget to open up the azure mssql server to these addreses
170127
# https://docs.travis-ci.com/user/ip-addresses/
171128

172129
# command to run tests
173130
script:
174-
# just the connection part
175-
- py.test tests/test_SessionFactory.py
176-
- py.test tests/test_connection.py
131+
177132
- py.test
178133

appveyor.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ environment:
3333
# a later point release.
3434
# See: http://www.appveyor.com/docs/installed-software#python
3535

36-
- PYTHON: "C:\\Python27"
37-
PYTHON_VERSION: "2.7.x" # currently 2.7.9
38-
PYTHON_ARCH: "32"
3936

40-
- PYTHON: "C:\\Python27-x64"
41-
PYTHON_VERSION: "2.7.x" # currently 2.7.9
42-
PYTHON_ARCH: "64"
37+
matrix:
38+
- PYTHON: "C:\\Python27-conda32"
39+
PYTHON_VERSION: "2.7"
40+
PYTHON_ARCH: "32"
41+
42+
- PYTHON: "C:\\Python34-conda64"
43+
PYTHON_VERSION: "3.4"
44+
PYTHON_ARCH: "64"
45+
4346
services:
4447
- mssql2008r2sp2
4548
- mysql

requirements.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
pyodbc
2-
#pymysql
32
six
43
sqlalchemy
54
-e git+https://github.com/ODM2/geoalchemy.git@odm2#egg=geoalchemy-0.7.3
6-
#https://github.com/ODM2/geoalchemy/archive/v0.7.3.tar.gz
75
shapely
86
pandas
97
#psycopg2 # Commented out because I could not pip install it.
10-
#matplotlib
11-
#sqlalchemy-migrate

setup.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@
1919
here = path.abspath(path.dirname(__file__))
2020
# with open('requirements.txt') as f:
2121
# require = f.readlines()
22-
# install_requires = [r.strip() for r in require if
22+
# install_reqs = [r.strip() for r in require if
2323
# not r.startswith('http') and not r.startswith('#')]
2424

25+
from pip.req import parse_requirements
26+
27+
install_reqs = parse_requirements('requirements.txt', session=False)
28+
29+
reqs = [str(ir.req) for ir in install_reqs]
30+
2531
# Get the long description from the relevant file
2632
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
2733
long_description = f.read()
@@ -50,7 +56,7 @@
5056
maintainer_email='david.valentine@gmail.com',
5157

5258
# Choose your license
53-
license='BSD',
59+
license='BSD-3-Clause',
5460

5561
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
5662
classifiers=[
@@ -87,15 +93,15 @@
8793
# requirements files see:
8894
# https://packaging.python.org/en/latest/requirements.html
8995

90-
#install_requires=install_requires,
91-
install_requires=[
92-
'pyodbc',
93-
'six',
94-
'sqlalchemy',
95-
'geoalchemy>=0.7.3',
96-
'shapely',
97-
'pandas',
98-
],
96+
install_requires=install_reqs,
97+
# install_requires=[
98+
# 'pyodbc',
99+
# 'six',
100+
# 'sqlalchemy',
101+
# 'geoalchemy>=0.7.3',
102+
# 'shapely',
103+
# 'pandas',
104+
# ],
99105
# dependency_links- geoalchemy from the ODM repository
100106
dependency_links=[
101107
"git+https://github.com/ODM2/geoalchemy.git@v0.7.3#egg=geoalchemy-0.7.3"

0 commit comments

Comments
 (0)