Skip to content

Commit 619b122

Browse files
committed
Get rid of deprecated setuptools.config.read_configuration
1 parent b829b35 commit 619b122

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

RELEASING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Following are notes for releasing NumExpr.
1010
Preliminaries
1111
-------------
1212

13-
* Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up to date with the latest news in the release.
13+
* Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up-to-date with the latest news in the release.
1414
* Ensure that there is no branch in the version in `setup.cfg`.
1515
* Do a commit and a push:
1616

setup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111

1212
import os, os.path as op
1313
from setuptools import setup, Extension
14-
from setuptools.config import read_configuration
1514
import platform
15+
import configparser
1616
import numpy as np
1717

1818
with open('requirements.txt') as f:
1919
requirements = f.read().splitlines()
2020

2121
with open('numexpr/version.py', 'w') as fh:
22-
cfg = read_configuration("setup.cfg")
22+
cfg = configparser.ConfigParser()
23+
cfg.read('setup.cfg')
2324
fh.write('# THIS FILE IS GENERATED BY `SETUP.PY`\n')
2425
fh.write("version = '%s'\n" % cfg['metadata']['version'])
2526
try:
@@ -54,12 +55,11 @@ def parse_site_cfg():
5455
"""
5556
Parses `site.cfg`, if it exists, to determine the location of Intel oneAPI MKL.
5657
57-
To compile NumExpr with MKL (VML) support, typically you need to copy the
58-
provided `site.cfg.example` to `site.cfg` and then edit the paths in the
59-
configuration lines for `include_dirs` and `library_dirs` paths to point
58+
To compile NumExpr with MKL (VML) support, typically you need to copy the
59+
provided `site.cfg.example` to `site.cfg` and then edit the paths in the
60+
configuration lines for `include_dirs` and `library_dirs` paths to point
6061
to the appropriate directories on your machine.
6162
"""
62-
import configparser
6363
site = configparser.ConfigParser()
6464
if not op.isfile('site.cfg'):
6565
return
@@ -77,7 +77,7 @@ def parse_site_cfg():
7777
site['mkl']['libraries'].replace(os.pathsep, ',').split(','))
7878
def_macros.append(('USE_VML', None))
7979
print(f'FOUND MKL IMPORT')
80-
80+
8181

8282
def setup_package():
8383

0 commit comments

Comments
 (0)