Skip to content

Commit 405c9a3

Browse files
committed
simplify DATA_PATH to remove config.py
1 parent da99450 commit 405c9a3

4 files changed

Lines changed: 3 additions & 52 deletions

File tree

winpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '8.0.20240514'
31+
__version__ = '8.1.20240523'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/config.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

winpython/piptree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from importlib.metadata import Distribution , distributions
88
from pathlib import Path
99

10-
# for package.ini safety belt
11-
from winpython.config import DATA_PATH
1210
import configparser as cp
1311

1412
def normalize(this):
@@ -17,9 +15,11 @@ def normalize(this):
1715

1816
def get_package_metadata(database, name, update=False, suggested_summary=None):
1917
"""Extract infos (description, url) from the local database"""
18+
# for package.ini safety belt
2019
# Note: we could use the PyPI database but this has been written on
2120
# machine which is not connected to the internet
2221
# we store only normalized names now (PEP 503)
22+
DATA_PATH = str(Path(sys.modules['winpython'].__file__).parent /'data')
2323
db = cp.ConfigParser()
2424
filepath = Path(database) if Path(database).is_absolute() else Path(DATA_PATH) / database
2525
try:

winpython/wppm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
# Local imports
2222
from winpython import utils
23-
from winpython.config import DATA_PATH
2423
import configparser as cp
2524

2625
# from former wppm separate script launcher

0 commit comments

Comments
 (0)