Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: Fix CI, Remove pkg_resources #88

Merged
merged 10 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/build-wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ jobs:
arch: aarch64
requires-python: ">=3.11,<3.12"
- os: macos-latest
arch: universal2
requires-python: ">=3.8,<3.10"
- os: macos-latest
arch: universal2
requires-python: ">=3.10,<3.12"
arch: arm64
requires-python: ">=3.9,<3.12"

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
if: ${{ matrix.os == 'windows-latest'}}
uses: microsoft/[email protected]
- name: Set up conda ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
if: ${{ matrix.module != 'gpu' }}
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 1 addition & 3 deletions CI/conda-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: xoscar-test
channels:
- defaults
dependencies:
- numpy
- numpy<2.0.0
- cloudpickle
- coverage
- cython
Expand Down Expand Up @@ -33,6 +33,4 @@ dependencies:
- pip

- pip:
- pickle5; python_version<"3.8"
- shared-memory38>=0.1.1; python_version<"3.8"
- uvloop>=0.14.0; sys.platform!="win32"
27 changes: 19 additions & 8 deletions CI/requirements-wheel.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
oldest-supported-numpy

pandas==1.0.4; python_version<'3.9' and platform_machine!='aarch64'
numpy<2.0.0
packaging
wheel

pandas==1.0.4; python_version<'3.9' and platform_machine!='aarch64' and platform_machine!='arm64'
pandas==1.1.3; python_version<'3.9' and platform_machine=='aarch64'
pandas==1.2.2; python_version>='3.9' and python_version<'3.10'
pandas==1.3.4; python_version>='3.10' and python_version<'3.11'
pandas==1.5.0; python_version>='3.11'
pandas==1.4.0; python_version<'3.9' and platform_machine=='arm64'
pandas==1.2.2; python_version>='3.9' and python_version<'3.10' and platform_machine!='arm64'
pandas==1.4.0; python_version>='3.9' and python_version<'3.10' and platform_machine=='arm64'
pandas==1.3.4; python_version>='3.10' and python_version<'3.11' and platform_machine!='arm64'
pandas==1.4.0; python_version>='3.10' and python_version<'3.11' and platform_machine=='arm64'
pandas==1.5.1; python_version>='3.11' and python_version<'3.12'
pandas>=2.1.1; python_version>'3.11'

scipy==1.4.1; python_version<'3.9' and platform_machine!='aarch64'
scipy==1.4.1; python_version<'3.9' and platform_machine!='aarch64' and platform_machine!='arm64'
scipy==1.7.3; python_version<'3.9' and platform_machine=='arm64'
scipy==1.5.3; python_version<'3.9' and platform_machine=='aarch64'
scipy==1.5.4; python_version>='3.9' and python_version<'3.10'
scipy==1.7.2; python_version>='3.10' and python_version<'3.11'
scipy==1.9.2; python_version>='3.11'
scipy==1.5.4; python_version>='3.9' and python_version<'3.10' and platform_machine!='arm64'
scipy==1.7.2; python_version>='3.10' and python_version<'3.11' and platform_machine!='arm64'
scipy==1.7.3; python_version>='3.10' and python_version<'3.11' and platform_machine=='arm64'
scipy==1.9.2; python_version>='3.11' and python_version<'3.12'
scipy>=1.11.2; python_version>'3.11'

# see: https://github.com/cython/cython/commit/afc00fc3ba5d43c67151c0039847a526e7b627a5
cython==0.29.33
Expand Down
1 change: 0 additions & 1 deletion doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Package Minimum support
`scikit-learn <https://scikit-learn.org/stable>`__ 0.20
cloudpickle 1.5.0
psutil 5.9.0
pickle5 (for python version < 3.8) 0.0.1
uvloop (for systems other than win32) 0.14.0
================================================================ ==========================

23 changes: 18 additions & 5 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
[build-system]
requires = [
"setuptools<64",
"packaging",
"wheel",
"oldest-supported-numpy",
"pandas>=1.0.4",
"scipy==1.4.1; python_version<'3.9' and platform_machine!='aarch64'",
luweizheng marked this conversation as resolved.
Show resolved Hide resolved
"scipy==1.4.1; python_version<'3.9' and platform_machine!='aarch64' and platform_machine!='arm64'",
"scipy==1.7.3; python_version<'3.9' and platform_machine=='arm64'",
"scipy==1.5.3; python_version<'3.9' and platform_machine=='aarch64'",
"scipy==1.5.4; python_version>='3.9' and python_version<'3.10' and sys_platform=='win32'",
"scipy>=1.4.1; python_version>='3.9' and python_version<'3.10' and sys_platform!='win32'",
"scipy>=1.4.1; python_version>='3.10'",
"scipy==1.5.4; python_version>='3.9' and python_version<'3.10' and platform_machine!='arm64'",
"scipy==1.7.2; python_version>='3.10' and python_version<'3.11' and platform_machine!='arm64'",
"scipy==1.7.3; python_version>='3.10' and python_version<'3.11' and platform_machine=='arm64'",
"scipy==1.9.2; python_version>='3.11' and python_version<'3.12'",
"scipy>=1.11.2; python_version>'3.11'",
"pandas==1.0.4; python_version<'3.9' and platform_machine!='aarch64' and platform_machine!='arm64'",
"pandas==1.1.3; python_version<'3.9' and platform_machine=='aarch64'",
"pandas==1.4.0; python_version<'3.9' and platform_machine=='arm64'",
"pandas==1.2.2; python_version>='3.9' and python_version<'3.10' and platform_machine!='arm64'",
"pandas==1.4.0; python_version>='3.9' and python_version<'3.10' and platform_machine=='arm64'",
"pandas==1.3.4; python_version>='3.10' and python_version<'3.11' and platform_machine!='arm64'",
"pandas==1.4.0; python_version>='3.10' and python_version<'3.11' and platform_machine=='arm64'",
"pandas==1.5.1; python_version>='3.11' and python_version<'3.12'",
"pandas>=2.1.1; python_version>'3.11'",
"numpy<2.0.0",
"cython>=0.29.33",
"requests>=2.4.0",
"cloudpickle>=2.2.1; python_version>='3.11'",
Expand Down
3 changes: 2 additions & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ zip_safe = False
include_package_data = True
packages = find:
install_requires =
numpy>=1.14.0
numpy>=1.14.0,<2.0.0
pandas>=1.0.0
scipy>=1.0.0; sys_platform!="win32" or python_version>="3.10"
scipy>=1.0.0,<=1.9.1; sys_platform=="win32" and python_version<"3.10"
Expand All @@ -33,6 +33,7 @@ install_requires =
tblib>=1.7.0
pickle5; python_version<"3.8"
uvloop>=0.14.0; sys_platform!="win32"
packaging

[options.packages.find]
exclude =
Expand Down
8 changes: 4 additions & 4 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import numpy as np
from Cython.Build import cythonize
from pkg_resources import parse_version
from packaging.version import Version
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext
from setuptools.extension import Library
Expand Down Expand Up @@ -63,9 +63,9 @@
)
target_macos_version = "10.9"

parsed_python_target = parse_version(python_target)
parsed_current_system = parse_version(current_system)
parsed_macos_version = parse_version(target_macos_version)
parsed_python_target = Version(python_target)
parsed_current_system = Version(current_system)
parsed_macos_version = Version(target_macos_version)
if parsed_python_target <= parsed_macos_version <= parsed_current_system:
os.environ["MACOSX_DEPLOYMENT_TARGET"] = target_macos_version

Expand Down
4 changes: 0 additions & 4 deletions python/xoscar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

# make sure methods are registered
from .backends import indigen, test
from .entrypoints import init_extension_entrypoints
from . import _version

del indigen, test
Expand All @@ -59,6 +58,3 @@
ActorRefType = Union[ActorRef, _T]

__version__ = _version.get_versions()["version"]

init_extension_entrypoints()
del init_extension_entrypoints
3 changes: 0 additions & 3 deletions python/xoscar/backends/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from ..api import Actor
from ..core import ActorRef, BufferRef, FileObjectRef, register_local_pool
from ..debug import debug_async_timeout, record_message_trace
from ..entrypoints import init_extension_entrypoints
from ..errors import (
ActorAlreadyExist,
ActorNotExist,
Expand Down Expand Up @@ -188,8 +187,6 @@ def __init__(
self._asyncio_task_timeout_detector_task = (
register_asyncio_task_timeout_detector()
)
# load third party extensions.
init_extension_entrypoints()
# init metrics
metric_configs = self._config.get_metric_configs()
metric_backend = metric_configs.get("backend")
Expand Down
42 changes: 0 additions & 42 deletions python/xoscar/entrypoints.py

This file was deleted.

Loading