mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-03 16:34:33 +00:00
fixed ci in python3 (#251)
* fixed ci in python3 * remove python2 compatible code
This commit is contained in:
committed by
Jiaqiang Xu
parent
71fea8c73c
commit
b85d194b4b
@@ -3,7 +3,7 @@ sudo: false
|
||||
# docker-based travis builds
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
- "3.7"
|
||||
services:
|
||||
- mysql
|
||||
compiler:
|
||||
|
@@ -154,7 +154,7 @@ class SeafileServer(Project):
|
||||
|
||||
|
||||
def fetch_and_build():
|
||||
libsearpc = Project('libsearpc')
|
||||
libsearpc = Libsearpc()
|
||||
ccnet = CcnetServer()
|
||||
seafile = SeafileServer()
|
||||
|
||||
|
@@ -226,6 +226,7 @@ connection_charset = utf8
|
||||
self.seafile_conf_dir,
|
||||
"-l",
|
||||
self.seafile_log,
|
||||
"-f",
|
||||
]
|
||||
self.seafile_proc = shell(cmd, wait=False)
|
||||
|
||||
@@ -248,7 +249,7 @@ connection_charset = utf8
|
||||
|
||||
|
||||
def create_mysql_dbs():
|
||||
sql = '''\
|
||||
sql = b'''\
|
||||
create database `ccnet` character set = 'utf8';
|
||||
create database `seafile` character set = 'utf8';
|
||||
|
||||
|
@@ -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.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import os
|
||||
from os.path import abspath, basename, exists, dirname, join
|
||||
import re
|
||||
|
@@ -14,24 +14,7 @@ a directory before running this script. That directory is passed in as the
|
||||
'--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
|
||||
|
||||
####################
|
||||
### 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 glob
|
||||
import subprocess
|
||||
|
@@ -1,12 +1,6 @@
|
||||
#coding: UTF-8
|
||||
|
||||
'''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 sys
|
||||
import os
|
||||
|
@@ -1,10 +1,5 @@
|
||||
# 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 os
|
||||
import configparser
|
||||
|
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
#coding: utf-8
|
||||
|
||||
from future import standard_library
|
||||
standard_library.install_aliases()
|
||||
from builtins import range
|
||||
from builtins import object
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
|
@@ -1,13 +1,6 @@
|
||||
#coding: UTF-8
|
||||
|
||||
'''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 sys
|
||||
import os
|
||||
|
@@ -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
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import re
|
||||
import fileinput
|
||||
|
||||
|
Reference in New Issue
Block a user