Browse Source

perf: 使用 poetry 管理依赖

pull/11166/head
ibuler 1 year ago
parent
commit
99ae0066ae
  1. 6
      Dockerfile
  2. 2
      Dockerfile-ee
  3. 6037
      poetry.lock
  4. 171
      pyproject.toml
  5. 2
      requirements/mac_pkg.sh
  6. 1
      requirements/requirements.txt
  7. 1
      requirements/requirements_xpack.txt

6
Dockerfile

@ -81,14 +81,16 @@ RUN set -ex \
fi
WORKDIR /tmp/build
COPY ./requirements ./requirements
COPY ./pyproject.toml ./pyproject.toml
COPY ./poetry.lock ./poetry.lock
ARG PIP_MIRROR=https://pypi.douban.com/simple
RUN --mount=type=cache,target=/root/.cache/pip \
set -ex \
&& pip config set global.index-url ${PIP_MIRROR} \
&& pip install -r requirements/requirements.txt
&& pip install poetry==1.5.1 \
&& poetry install --only=main
COPY --from=stage-build /opt/jumpserver/release/jumpserver /opt/jumpserver
RUN echo > /opt/jumpserver/config.yml \

2
Dockerfile-ee

@ -7,4 +7,4 @@ WORKDIR /opt/jumpserver
RUN --mount=type=cache,target=/root/.cache/pip \
set -ex \
&& pip install -r requirements/requirements_xpack.txt
&& poetry install --only=xpack

6037
poetry.lock

File diff suppressed because it is too large Load Diff

171
pyproject.toml

@ -0,0 +1,171 @@
[tool.poetry]
name = "jumpserver"
version = "v3.5"
description = "广受欢迎的开源堡垒机"
authors = ["ibuler <ibuler@qq.com>"]
license = "GPLv3"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
cython = "3.0.0"
aiofiles = "23.1.0"
amqp = "5.1.1"
ansible-core = { url = "https://github.com/jumpserver/ansible/releases/download/v2.14.1.2/ansible-2.14.1.2.zip" }
ansible = "7.1.0"
ansible-runner = "2.3.3"
asn1crypto = "1.5.1"
bcrypt = "4.0.1"
billiard = "4.1.0"
certifi = "2023.7.22"
cffi = "1.15.1"
chardet = "5.1.0"
configparser = "6.0.0"
decorator = "5.1.1"
docutils = "0.20.1"
ecdsa = "0.18.0"
enum-compat = "0.0.3"
ephem = "4.1.4"
future = "0.18.3"
idna = "3.4"
itypes = "1.2.0"
jinja2 = "3.1.2"
markupsafe = "2.1.3"
olefile = "0.46"
paramiko = "3.2.0"
passlib = "1.7.4"
pyasn1 = "0.5.0"
pycparser = "2.21"
cryptography = "41.0.2"
pycryptodome = "3.18.0"
pycryptodomex = "3.18.0"
phonenumbers = "8.13.17"
gmssl = "3.2.2"
itsdangerous = "1.1.0"
pyotp = "2.8.0"
pynacl = "1.5.0"
python-dateutil = "2.8.2"
pyyaml = "6.0.1"
requests = "2.31.0"
jms-storage = "0.0.50"
simplejson = "3.19.1"
six = "1.16.0"
sshtunnel = "0.4.0"
sshpubkeys = "3.3.1"
uritemplate = "4.1.1"
urllib3 = "1.26.16"
vine = "5.0.0"
werkzeug = "2.3.6"
unicodecsv = "0.14.1"
httpsig = "1.3.0"
treelib = "1.6.4"
psutil = "5.9.5"
msrestazure = "0.6.4"
adal = "1.2.7"
openpyxl = "3.0.10"
pyexcel = "0.7.0"
pyexcel-xlsx = "0.6.0"
data-tree = "0.0.1"
pyvmomi = "8.0.1.0.2"
termcolor = "2.3.0"
html2text = "2020.1.16"
pyzipper = "0.3.6"
python3-saml = "1.15.0"
websocket-client = "1.6.1"
pyjwkest = "1.4.2"
jsonfield2 = "4.0.0.post0"
geoip2 = "4.7.0"
ipip-ipdb = "1.6.1"
pywinrm = "0.4.3"
python-nmap = "0.7.1"
django = "4.1.10"
django-bootstrap3 = "23.4"
django-filter = "23.2"
django-formtools = "2.4.1"
django-ranged-response = "0.2.0"
django-rest-swagger = "2.2.0"
django-simple-captcha = "0.5.18"
django-timezone-field = "5.1"
djangorestframework = "3.14.0"
djangorestframework-bulk = "0.2.1"
django-simple-history = "3.3.0"
django-private-storage = "3.1"
drf-nested-routers = "0.93.4"
drf-writable-nested = "0.7.0"
rest-condition = "1.0.3"
drf-yasg = "1.21.7"
coreapi = "2.3.3"
coreschema = "0.0.4"
openapi-codec = "1.3.2"
pillow = "10.0.0"
pytz = "2023.3"
django-proxy = "1.2.2"
channels-redis = "4.1.0"
python-daemon = "3.0.1"
eventlet = "0.33.3"
greenlet = "2.0.2"
gunicorn = "21.2.0"
celery = "5.3.1"
flower = "2.0.0"
django-celery-beat = "2.5.0"
kombu = "5.3.1"
uvicorn = { version = "0.22.0", extras = ["standard"] }
websockets = "11.0.3"
python-ldap = "3.4.3"
ldap3 = "2.9.1"
django-radius = { url = "https://github.com/ibuler/django-radius/archive/refs/tags/1.5.0.zip" }
django-cas-ng = { url = "https://github.com/ibuler/django-cas-ng/releases/download/v4.3.1/django-cas-ng-4.3.1.zip" }
python-cas = "1.6.0"
django-auth-ldap = "4.4.0"
boto3 = "1.28.9"
botocore = "1.31.9"
s3transfer = "0.6.1"
kubernetes = "27.2.0"
mysqlclient = "2.2.0"
pymysql = "1.1.0"
django-redis = "5.3.0"
python-redis-lock = "4.0.0"
pyopenssl = "23.2.0"
redis = "4.6.0"
pymongo = "4.4.1"
pyfreerdp = "0.0.1"
ipython = "8.14.0"
forgerypy3 = "0.3.1"
django-debug-toolbar = "4.1.0"
pympler = "1.0.1"
hvac = "1.1.1"
pyhcl = "0.4.4"
ipy = "1.1"
[tool.poetry.group.dev.dependencies]
daphne = "4.0.0"
channels = "^4.0.0"
channels-redis = "^4.1.0"
[tool.poetry.group.xpack.dependencies]
qingcloud-sdk = "1.2.15"
azure-mgmt-subscription = "3.1.1"
azure-identity = "1.13.0"
azure-mgmt-compute = "30.0.0"
azure-mgmt-network = "23.1.0"
google-cloud-compute = "1.13.0"
grpcio = "1.56.2"
alibabacloud-dysmsapi20170525 = "2.0.24"
python-novaclient = "18.3.0"
python-keystoneclient = "5.1.0"
bce-python-sdk = "0.8.87"
tencentcloud-sdk-python = "3.0.941"
aliyun-python-sdk-core-v3 = "2.13.33"
aliyun-python-sdk-ecs = "4.24.64"
keystoneauth1 = "5.2.1"
oracledb = "1.3.2"
psycopg2-binary = "2.9.6"
pymssql = "2.2.7"
psycopg2 = "2.9.6"
ucloud-sdk-python3 = "0.11.50"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

2
requirements/mac_pkg.sh

@ -6,7 +6,7 @@ echo "1. 安装依赖"
brew install libtiff libjpeg webp little-cms2 openssl gettext git \
git-lfs libxml2 libxmlsec1 pkg-config postgresql freetds openssl \
libffi freerdp
pip install daphne channels channel-redis
pip install daphne==4.0.0 channels channels-redis
echo "2. 下载 IP 数据库"
ip_db_path="${PROJECT_DIR}/apps/common/utils/geoip/GeoLite2-City.mmdb"

1
requirements/requirements.txt

@ -68,6 +68,7 @@ pyjwkest==1.4.2
jsonfield2==4.0.0.post0
geoip2==4.7.0
ipip-ipdb==1.6.1
IPy==1.1
pywinrm==0.4.3
python-nmap==0.7.1
# Django environment

1
requirements/requirements_xpack.txt

@ -19,6 +19,5 @@ keystoneauth1==5.2.1
oracledb==1.3.2
psycopg2-binary==2.9.6
pymssql==2.2.7
IPy==1.1
psycopg2==2.9.6
ucloud-sdk-python3==0.11.50

Loading…
Cancel
Save