1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-02 16:04:26 +00:00

fixed ci in python3 (#251)

* fixed ci in python3

* remove python2 compatible code
This commit is contained in:
Xiangyue Cai
2019-07-16 12:00:45 +08:00
committed by Jiaqiang Xu
parent 71fea8c73c
commit b85d194b4b
10 changed files with 4 additions and 45 deletions

View File

@@ -3,7 +3,7 @@ sudo: false
# docker-based travis builds # docker-based travis builds
language: python language: python
python: python:
- "2.7" - "3.7"
services: services:
- mysql - mysql
compiler: compiler:

View File

@@ -154,7 +154,7 @@ class SeafileServer(Project):
def fetch_and_build(): def fetch_and_build():
libsearpc = Project('libsearpc') libsearpc = Libsearpc()
ccnet = CcnetServer() ccnet = CcnetServer()
seafile = SeafileServer() seafile = SeafileServer()

View File

@@ -226,6 +226,7 @@ connection_charset = utf8
self.seafile_conf_dir, self.seafile_conf_dir,
"-l", "-l",
self.seafile_log, self.seafile_log,
"-f",
] ]
self.seafile_proc = shell(cmd, wait=False) self.seafile_proc = shell(cmd, wait=False)
@@ -248,7 +249,7 @@ connection_charset = utf8
def create_mysql_dbs(): def create_mysql_dbs():
sql = '''\ sql = b'''\
create database `ccnet` character set = 'utf8'; create database `ccnet` character set = 'utf8';
create database `seafile` character set = 'utf8'; create database `seafile` character set = 'utf8';

View File

@@ -7,7 +7,6 @@ The directory is ./symbols/seaf-daemon.exe/${symbol_id}/seaf-daemon.exe.sym,
where symbol_id is the first line of the "dump_syms" output. where symbol_id is the first line of the "dump_syms" output.
""" """
from __future__ import print_function
import os import os
from os.path import abspath, basename, exists, dirname, join from os.path import abspath, basename, exists, dirname, join
import re import re

View File

@@ -14,24 +14,7 @@ a directory before running this script. That directory is passed in as the
'--thirdpartdir' arguments. '--thirdpartdir' arguments.
''' '''
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import input
from builtins import object
import sys import sys
####################
### Requires Python 2.6+
####################
if sys.version_info[0] == 3:
print('Python 3 not supported yet. Quit now.')
sys.exit(1)
if sys.version_info[1] < 6:
print('Python 2.6 or above is required. Quit now.')
sys.exit(1)
import os import os
import glob import glob
import subprocess import subprocess

View File

@@ -1,12 +1,6 @@
#coding: UTF-8 #coding: UTF-8
'''This script would check if there is admin, and prompt the user to create a new one if non exist''' '''This script would check if there is admin, and prompt the user to create a new one if non exist'''
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import input
from builtins import object
import json import json
import sys import sys
import os import os

View File

@@ -1,10 +1,5 @@
# coding: UTF-8 # coding: UTF-8
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import object
import sys import sys
import os import os
import configparser import configparser

View File

@@ -1,10 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
#coding: utf-8 #coding: utf-8
from future import standard_library
standard_library.install_aliases()
from builtins import range
from builtins import object
import os import os
import sys import sys
import logging import logging

View File

@@ -1,13 +1,6 @@
#coding: UTF-8 #coding: UTF-8
'''This script would guide the seafile admin to setup seafile with MySQL''' '''This script would guide the seafile admin to setup seafile with MySQL'''
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import input
from builtins import object
import argparse import argparse
import sys import sys
import os import os

View File

@@ -11,8 +11,6 @@ Then you can import the .sql file into MySql
Note - you need to add foreign key constrains manually since sqlite doesn't actually support them Note - you need to add foreign key constrains manually since sqlite doesn't actually support them
""" """
from __future__ import print_function
import re import re
import fileinput import fileinput