Skip to content

Commit

Permalink
Get rid of deprecated setuptools.config.read_configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Dec 11, 2023
1 parent b829b35 commit 619b122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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():

Expand Down

0 comments on commit 619b122

Please sign in to comment.