From 619b122433216adcdf9b5a30b2e0d3f045c7d078 Mon Sep 17 00:00:00 2001 From: Francesc Alted Date: Mon, 11 Dec 2023 13:13:07 +0100 Subject: [PATCH] Get rid of deprecated setuptools.config.read_configuration --- RELEASING.md | 2 +- setup.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index fb74ce8..efbbf16 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -10,7 +10,7 @@ Following are notes for releasing NumExpr. Preliminaries ------------- -* Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up to date with the latest news in the release. +* Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up-to-date with the latest news in the release. * Ensure that there is no branch in the version in `setup.cfg`. * Do a commit and a push: diff --git a/setup.py b/setup.py index a6edb06..74c3383 100644 --- a/setup.py +++ b/setup.py @@ -11,15 +11,16 @@ import os, os.path as op from setuptools import setup, Extension -from setuptools.config import read_configuration import platform +import configparser import numpy as np with open('requirements.txt') as f: requirements = f.read().splitlines() with open('numexpr/version.py', 'w') as fh: - cfg = read_configuration("setup.cfg") + cfg = configparser.ConfigParser() + cfg.read('setup.cfg') fh.write('# THIS FILE IS GENERATED BY `SETUP.PY`\n') fh.write("version = '%s'\n" % cfg['metadata']['version']) try: @@ -54,12 +55,11 @@ def parse_site_cfg(): """ Parses `site.cfg`, if it exists, to determine the location of Intel oneAPI MKL. - To compile NumExpr with MKL (VML) support, typically you need to copy the - provided `site.cfg.example` to `site.cfg` and then edit the paths in the - configuration lines for `include_dirs` and `library_dirs` paths to point + To compile NumExpr with MKL (VML) support, typically you need to copy the + provided `site.cfg.example` to `site.cfg` and then edit the paths in the + configuration lines for `include_dirs` and `library_dirs` paths to point to the appropriate directories on your machine. """ - import configparser site = configparser.ConfigParser() if not op.isfile('site.cfg'): return @@ -77,7 +77,7 @@ def parse_site_cfg(): site['mkl']['libraries'].replace(os.pathsep, ',').split(',')) def_macros.append(('USE_VML', None)) print(f'FOUND MKL IMPORT') - + def setup_package():