11
11
12
12
import os , os .path as op
13
13
from setuptools import setup , Extension
14
- from setuptools .config import read_configuration
15
14
import platform
15
+ import configparser
16
16
import numpy as np
17
17
18
18
with open ('requirements.txt' ) as f :
19
19
requirements = f .read ().splitlines ()
20
20
21
21
with open ('numexpr/version.py' , 'w' ) as fh :
22
- cfg = read_configuration ("setup.cfg" )
22
+ cfg = configparser .ConfigParser ()
23
+ cfg .read ('setup.cfg' )
23
24
fh .write ('# THIS FILE IS GENERATED BY `SETUP.PY`\n ' )
24
25
fh .write ("version = '%s'\n " % cfg ['metadata' ]['version' ])
25
26
try :
@@ -54,12 +55,11 @@ def parse_site_cfg():
54
55
"""
55
56
Parses `site.cfg`, if it exists, to determine the location of Intel oneAPI MKL.
56
57
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
60
61
to the appropriate directories on your machine.
61
62
"""
62
- import configparser
63
63
site = configparser .ConfigParser ()
64
64
if not op .isfile ('site.cfg' ):
65
65
return
@@ -77,7 +77,7 @@ def parse_site_cfg():
77
77
site ['mkl' ]['libraries' ].replace (os .pathsep , ',' ).split (',' ))
78
78
def_macros .append (('USE_VML' , None ))
79
79
print (f'FOUND MKL IMPORT' )
80
-
80
+
81
81
82
82
def setup_package ():
83
83
0 commit comments