Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 027b001

Browse filesBrowse files
authored
Merge pull request winpython#1163 from stonebig/master
check and remove osp comments
2 parents bc5f8a6 + 6181721 commit 027b001
Copy full SHA for 027b001

File tree

Expand file treeCollapse file tree

6 files changed

+0
-125
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+0
-125
lines changed

‎diff.py

Copy file name to clipboardExpand all lines: diff.py
-25Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from __future__ import print_function, with_statement
1414

1515
import os
16-
# import os.path as osp
1716
from pathlib import Path
1817
import re
1918
import shutil
@@ -25,11 +24,7 @@
2524
def normalize(name):
2625
return re.sub(r"[-_.]+", "-", name).lower()
2726

28-
# CHANGELOGS_DIR = osp.join(
29-
# osp.dirname(__file__), 'changelogs'
30-
# )
3127
CHANGELOGS_DIR = str(Path(__file__).parent / 'changelogs')
32-
# assert osp.isdir(CHANGELOGS_DIR)
3328
assert Path(CHANGELOGS_DIR).is_dir()
3429

3530

@@ -111,16 +106,6 @@ def __init__(
111106
self.from_file(basedir)
112107

113108
def from_file(self, basedir):
114-
# fname = osp.join(basedir, 'build%s' % self.flavor,
115-
#fname = osp.join(
116-
# CHANGELOGS_DIR,
117-
# 'WinPython%s-%sbit-%s.md'
118-
# % (
119-
# self.flavor,
120-
# self.architecture,
121-
# self.version,
122-
# ),
123-
#)
124109
fname = str(Path(CHANGELOGS_DIR) /
125110
f'WinPython{self.flavor}-{self.architecture}bit-{self.version}.md')
126111

@@ -214,7 +199,6 @@ def find_closer_version(
214199
version1, basedir=None, flavor='', architecture=64
215200
):
216201
"""Find version which is the closest to `version`"""
217-
# builddir = osp.join(basedir, 'bu%s' % flavor)
218202
builddir = str(Path(basedir) / f'bu{flavor}')
219203
func = lambda name: re.match(
220204
r'WinPython%s-%sbit-([0-9\.]*)\.(txt|md)'
@@ -311,9 +295,7 @@ def _copy_all_changelogs(
311295
name,
312296
):
313297
shutil.copyfile(
314-
# osp.join(CHANGELOGS_DIR, name),
315298
str(Path(CHANGELOGS_DIR) / name),
316-
# osp.join(basedir, 'bu%s' % flavor, name),
317299
str(Path(basedir) / f'bu{flavor}' / name),
318300
)
319301

@@ -347,12 +329,6 @@ def write_changelog(
347329
flavor=flavor,
348330
architecture=architecture,
349331
)
350-
#fname = osp.join(
351-
# basedir,
352-
# 'bu%s' % flavor,
353-
# 'WinPython%s-%sbit-%s_History.md'
354-
# % (flavor, architecture, version2),
355-
#)
356332
fname = str(Path(basedir) /
357333
f'bu{flavor}' /
358334
f'WinPython{flavor}-{architecture}bit-{version2}_History.md')
@@ -364,7 +340,6 @@ def write_changelog(
364340
fdesc.write(text)
365341
# Copy to winpython/changelogs
366342
shutil.copyfile(
367-
#fname, osp.join(CHANGELOGS_DIR, osp.basename(fname))
368343
fname, str(Path(CHANGELOGS_DIR) / Path(fname).name)
369344
)
370345

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
from distutils.core import setup
1818
import os
19-
# import os.path as osp
2019
from pathlib import Path
2120

2221
def get_package_data(name, extlist):
@@ -28,11 +27,9 @@ def get_package_data(name, extlist):
2827
for fname in filenames:
2928
if (
3029
not fname.startswith('.')
31-
# and osp.splitext(fname)[1] in extlist
3230
and Path(fname).suffix in extlist
3331
):
3432
flist.append(
35-
# osp.join(dirpath, fname)[offset:]
3633
str(Path(dirpath) / fname)[offset:]
3734
)
3835
return flist
@@ -42,8 +39,6 @@ def get_subpackages(name):
4239
"""Return subpackages of package *name*"""
4340
splist = []
4441
for dirpath, _dirnames, _filenames in os.walk(name):
45-
# if osp.isfile(osp.join(dirpath, '__init__.py')):
46-
# if osp.isfile(str(Path(dirpath) / '__init__.py')):
4742
if (Path(dirpath) / '__init__.py').is_file():
4843
splist.append(".".join(dirpath.split(os.sep)))
4944
return splist
@@ -86,14 +81,6 @@ def get_subpackages(name):
8681
),
8782
)
8883
},
89-
# requires=["PyQt4 (>=4.5)"],
90-
#scripts=[
91-
# osp.join('scripts', fname)
92-
# for fname in (
93-
# 'register_python',
94-
# 'register_python.bat',
95-
# )
96-
#],
9784
# use setuptools functionalities
9885
entry_points={
9986
'console_scripts': [

‎test.py

Copy file name to clipboardExpand all lines: test.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import sys
1616
import os
17-
# import os.path as osp
1817
from pathlib import Path
1918
import re
2019

@@ -26,11 +25,8 @@ def test_python_packages(pyver):
2625
"""Check if all Python packages are supported by WinPython"""
2726
basedir = utils.get_basedir(pyver)
2827
for suffix in ('src', 'win32', 'win-amd64'):
29-
# dirname = osp.join(basedir, 'packages.%s' % suffix)
3028
dirname = str(Path(basedir) / f'packages.{suffix}')
3129
for name in os.listdir(dirname):
32-
# if osp.isfile(osp.join(dirname, name)) \
33-
# if osp.isfile(str(Path(dirname) / name)) \
3430
if (Path(dirname) / name).is_file() \
3531
and not re.match(r'python-([0-9\.]*)(\.amd64)?\.msi', name):
3632
try:

‎winpython/config.py

Copy file name to clipboardExpand all lines: winpython/config.py
-14Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@
1111
"""
1212

1313
import sys
14-
# import os.path as osp
1514
from pathlib import Path
1615

1716
def get_module_path(modname):
1817
"""Return module *modname* base path"""
19-
#return osp.abspath(
20-
# osp.dirname(sys.modules[modname].__file__)
21-
#)
2218
return str(Path(sys.modules[modname].__file__).parent.resolve())
2319

2420

@@ -34,22 +30,12 @@ def get_module_data_path(
3430
return datapath
3531
else:
3632
datapath = get_module_path(modname)
37-
# parentdir = osp.join(datapath, osp.pardir)
3833
parentdir = str(Path(datapath).parent)
39-
#if osp.isfile(parentdir):
4034
if Path(parentdir).is_file():
4135
# Parent directory is not a directory but the 'library.zip' file:
4236
# this is either a py2exe or a cx_Freeze distribution
43-
#datapath = osp.abspath(
44-
# osp.join(
45-
# osp.join(parentdir, osp.pardir), modname
46-
# )
47-
#)
4837
datapath = str((Path(parentdir).parent / modname).resolve())
4938
if relpath is not None:
50-
#datapath = osp.abspath(
51-
# osp.join(datapath, relpath)
52-
#)
5339
datapath = str((Path(datapath) / relpath).resolve())
5440
return datapath
5541

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.