From 4276ddc2ccd7a70b9fc632d64e3cdd6cabef7438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B9=BF=E5=AE=8F=E4=BC=9F?= Date: Mon, 5 Sep 2022 18:50:33 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E8=84=9A=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements/mac_pkg.sh | 11 ++++++++++- requirements/requirements.txt | 7 +++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/requirements/mac_pkg.sh b/requirements/mac_pkg.sh index 5108b36fa..45049eb0a 100644 --- a/requirements/mac_pkg.sh +++ b/requirements/mac_pkg.sh @@ -3,7 +3,9 @@ BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" PROJECT_DIR=$(dirname "$BASE_DIR") echo "1. 安装依赖" -brew install libtiff libjpeg webp little-cms2 openssl gettext git git-lfs mysql libxml2 libxmlsec1 pkg-config postgresql freetds openssl +brew install libtiff libjpeg webp little-cms2 openssl gettext git \ + git-lfs mysql libxml2 libxmlsec1 pkg-config postgresql freetds openssl \ + libffi echo "2. 下载 IP 数据库" ip_db_path="${PROJECT_DIR}/apps/common/utils/geoip/GeoLite2-City.mmdb" @@ -11,3 +13,10 @@ wget "https://download.jumpserver.org/files/GeoLite2-City.mmdb" -O "${ip_db_path echo "3. 安装依赖的插件" git lfs install + +if ! uname -a | grep 'ARM64' &> /dev/null;then + exit 0 +fi + +echo "4. For Apple processor" +LDFLAGS="-L$(brew --prefix freetds)/lib -L$(brew --prefix openssl@1.1)/lib" CFLAGS="-I$(brew --prefix freetds)/include" pip install $(grep 'pymssql' requirements.txt) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 7c3a4710b..20c33d2bc 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -4,7 +4,7 @@ asn1crypto==0.24.0 bcrypt==3.1.4 billiard==3.6.4.0 certifi==2018.1.18 -cffi==1.13.2 +cffi==1.15.1 chardet==3.0.4 configparser==3.5.0 decorator==4.1.2 @@ -23,7 +23,7 @@ paramiko==2.11.0 passlib==1.7.4 pyasn1==0.4.8 pycparser==2.21 -cryptography==36.0.1 +cryptography==37.0.4 pycryptodome==3.15.0 pycryptodomex==3.15.0 gmssl==3.2.1 @@ -130,7 +130,7 @@ mysqlclient==2.1.0 PyMySQL==1.0.2 oracledb==1.0.1 psycopg2-binary==2.9.1 -pymssql==2.1.5 +pymssql==2.2.5 django-mysql==3.9.0 django-redis==5.2.0 python-redis-lock==3.7.0 @@ -141,4 +141,3 @@ ForgeryPy3==0.3.1 django-debug-toolbar==3.5 Pympler==1.0.1 IPy==1.1 -IPy==1.1