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

MNT Remove dependency on distutils #553

Merged
merged 6 commits into from
Sep 1, 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
4 changes: 2 additions & 2 deletions .github/workflows/install_from_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
max-parallel: 5

steps:
Expand All @@ -35,7 +35,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y inkscape
pip install --upgrade pip
pip install build wheel numpy "cython<3.0"
pip install setuptools build wheel numpy "cython<3.0"

- name: Create the wheel
run: python setup.py bdist_wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
max-parallel: 5

steps:
Expand Down Expand Up @@ -52,4 +52,4 @@ jobs:
env_vars: OS,PYTHON
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
verbose: false
2 changes: 1 addition & 1 deletion cortex/svgoverlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from scipy.spatial import cKDTree
from builtins import zip, str

from distutils.version import LooseVersion
from looseversion import LooseVersion

from lxml import etree
from lxml.builder import E
Expand Down
2 changes: 1 addition & 1 deletion cortex/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import tempfile
import urllib.request
import warnings
from distutils.version import LooseVersion
from looseversion import LooseVersion
from importlib import import_module

import h5py
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
# Minimum requirements for the build system to execute, according to PEP518
# specification.
requires = ["setuptools<60.0", "build", "numpy", "cython<3.0", "wheel"]
requires = ["setuptools", "build", "numpy", "cython<3.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.codespell]
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ pillow
nibabel>=2.1
networkx>=2.1
imageio
looseversion
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os
from glob import glob
from numpy.distutils.misc_util import get_numpy_include_dirs
import numpy

try:
import configparser
Expand Down Expand Up @@ -78,18 +78,18 @@ def get_version():
'OpenCTM-1.0.3/lib/liblzma/LzFind.c',
'OpenCTM-1.0.3/lib/liblzma/LzmaDec.c',
'OpenCTM-1.0.3/lib/liblzma/LzmaEnc.c',
'OpenCTM-1.0.3/lib/liblzma/LzmaLib.c',],
'OpenCTM-1.0.3/lib/liblzma/LzmaLib.c',],
libraries=['m'], include_dirs=[
'OpenCTM-1.0.3/lib/',
'OpenCTM-1.0.3/lib/liblzma/'] + get_numpy_include_dirs(),
'OpenCTM-1.0.3/lib/',
'OpenCTM-1.0.3/lib/liblzma/', numpy.get_include()],
define_macros=[
('LZMA_PREFIX_CTM', None),
('OPENCTM_BUILD', None),
#('__DEBUG_', None),
]
)
formats = Extension('cortex.formats', ['cortex/formats.pyx'],
include_dirs=get_numpy_include_dirs())
include_dirs=[numpy.get_include()])

DISTNAME = 'pycortex'
# VERSION needs to be modified under cortex/version.py
Expand Down