diff --git a/.github/workflows/run_test.yaml b/.github/workflows/run_test.yaml index 48681e91..e9229ea4 100644 --- a/.github/workflows/run_test.yaml +++ b/.github/workflows/run_test.yaml @@ -25,10 +25,8 @@ jobs: - name: Install nebulagraph-python from source and test dependencies run: | python -m pip install --upgrade pip - # remove pyproject.toml to avoid pdm install - rm pyproject.toml + pip install pytest pytest-cov pip install . - pip install pip-tools pytest - name: Test with pytest run: | docker-compose -f docker-compose.yaml up -d @@ -42,7 +40,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: [3.7, 3.8, 3.9, '3.10', 3.11] + python-version: [3.8, 3.9, '3.10', 3.11, 3.12] steps: - name: Maximize runner space @@ -62,10 +60,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install . - pdm install -G:dev - pdm install -G:test + pdm sync - name: lint run: pdm fmt-check - name: Test with pytest diff --git a/README.md b/README.md index 611520f2..cb576785 100644 --- a/README.md +++ b/README.md @@ -60,18 +60,10 @@ cd nebula-python - Install from source -> For python version >= 3.7.0 - ```bash pip install . ``` -> For python version >= 3.6.2, < 3.7.0 - -```bash -python3 setup.py install -``` - ## Quick Example: Connecting to GraphD Using Graph Client diff --git a/pyproject.toml b/pyproject.toml index f876d484..fbe6cdd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "nebula3-python" version = "3.8.0" -description = "Python client for NebulaGraph V3.4" +description = "Python client for NebulaGraph v3" authors = [ {name = "vesoft-inc", email = "info@vesoft.com"}, ] @@ -20,8 +20,11 @@ license = {text = "Apache 2.0"} Homepage = "https://github.com/vesoft-inc/nebula-python" [build-system] -requires = ["pdm-backend"] -build-backend = "pdm.backend" +requires = ["flit-core<3.9,>=3.4"] +build-backend = "flit_core.buildapi" + +[tool.flit.module] +name = "nebula3" [tool.black] extend-exclude = ''' diff --git a/setup.py b/setup.py deleted file mode 100644 index 00c42f66..00000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2020 vesoft inc. All rights reserved. -# -# This source code is licensed under Apache 2.0 License. - -import sys -from setuptools import setup, find_packages -from pathlib import Path - -base_dir = Path(__file__).parent -long_description = (base_dir / "README.md").read_text() - -requirements = [ - "httplib2 >= 0.20.0", - "future >= 0.18.0", - "six >= 1.16.0", - "pytz >= 2021.1", - "httpx[http2] >= 0.22.0", -] - -if sys.version_info < (3, 7): - # httpcore-->anyio-->contextvars when it's < 3.7 - # while setuptools doesn't handle the dependency well - requirements.append("contextvars==2.4") - -setup( - name="nebula3-python", - version="3.8.0", - license="Apache 2.0", - author="vesoft-inc", - author_email="info@vesoft.com", - description="Python client for NebulaGraph V3.4", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/vesoft-inc/nebula-python", - install_requires=requirements, - packages=find_packages(), - platforms=["3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12"], - package_dir={"nebula3": "nebula3"}, -)