Skip to content

Commit ac5fc5c

Browse files
committed
Continue cleanup
1 parent 6d41775 commit ac5fc5c

File tree

10 files changed

+66
-29
lines changed

10 files changed

+66
-29
lines changed

aptsources-cleanup

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/python3 -OEs
2+
# -*- coding: utf-8
3+
4+
import os, sys
5+
sys_path = sys.path
6+
if os.altsep:
7+
sys_path = ( p.replace(os.altsep, os.sep) for p in sys_path )
8+
sys.path[:] = [ p for p in sys_path if 'site-packages' not in p.split(os.sep) ]
9+
del sys_path
10+
11+
import runpy
12+
runpy.run_module('aptsources_cleanup', run_name='__main__')

aptsources_cleanup/__main__.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# -*- coding: utf-8
2-
from .util.terminal import *
3-
from .util.operator import methodcaller, peek
4-
from .util.itertools import *
5-
from .util.fileutils import *
6-
from .util.filesystem import *
7-
from .util.gettext import *
8-
from .util.relations import *
9-
from .util.strings import *
10-
from .util.io import *
11-
from . import *
2+
from .util import (
3+
_, _N, _U, foreach, peek, filterfalse, methodcaller, translations,
4+
DictTranslations, replace_TextIOWrapper, remove_sources_files, prefix,
5+
EquivalenceRelation, Choices, display_file
6+
)
7+
from . import get_duplicates, get_empty_files
128
import sys
139
import os.path
1410
import itertools
@@ -19,6 +15,7 @@
1915
from functools import reduce, partial as fpartial
2016
import aptsources.sourceslist
2117
import aptsources_cleanup
18+
from .util.terminal import termwrap
2219

2320

2421
argparse._ = _
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""
2+
Autogenerated With:
3+
mkinit aptsources_cleanup/util/__init__.py -w --rel --nomod
4+
"""
5+
from .collections import (ExtSet,)
6+
from .filesystem import (remove_sources_files, samefile,)
7+
from .fileutils import (display_file,)
8+
from .functools import (LazyInstance, comp,)
9+
from .gettext import (ChoiceInfo, Choices, DictTranslations, GNUTranslations,
10+
NullTranslations, _, _N, _U, translation, translations,)
11+
from .import_check import (import_check,)
12+
from .io import (FileDescriptor, isatty, replace_TextIOWrapper,)
13+
from .itertools import (accumulate, count, filterfalse, foreach, unique,)
14+
from .operator import (identity, itemgetter0, itemgetter1, methodcaller, peek,
15+
starcall,)
16+
from .pkg import (check_integrity,)
17+
from .relations import (EquivalenceRelation,)
18+
from .strings import (contains_ordered, lstrip, prefix, rstrip,
19+
startswith_token, strip,)
20+
from .terminal import (TERMMODES, termwrap, try_input,)
21+
from .version import (get_version, version_info,)
22+
from .zipfile import (ZipFile,)
23+
24+
__all__ = ['ChoiceInfo', 'Choices', 'DictTranslations', 'EquivalenceRelation',
25+
'ExtSet', 'FileDescriptor', 'GNUTranslations', 'LazyInstance',
26+
'NullTranslations', 'TERMMODES', 'ZipFile', '_', '_N', '_U',
27+
'accumulate', 'check_integrity', 'comp', 'contains_ordered',
28+
'count', 'display_file', 'filterfalse', 'foreach', 'get_version',
29+
'identity', 'import_check', 'isatty', 'itemgetter0', 'itemgetter1',
30+
'lstrip', 'methodcaller', 'peek', 'prefix', 'remove_sources_files',
31+
'replace_TextIOWrapper', 'rstrip', 'samefile', 'starcall',
32+
'startswith_token', 'strip', 'termwrap', 'translation',
33+
'translations', 'try_input', 'unique', 'version_info']

aptsources_cleanup/util/collections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
__all__ = ['ExtSet']
77

8-
# from collections import *
9-
# from collections import abc
8+
from collections import * # NOQA
9+
from collections import abc # NOQA
1010

1111
import collections as _collections
1212
__all__ += _collections.__all__

aptsources_cleanup/util/functools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from .operator import identity
77
from operator import attrgetter
8+
from functools import * # NOQA
89
import functools as _functools
910
__all__ += _functools.__all__
1011

aptsources_cleanup/util/operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8
22
__all__ = (
33
"identity", "methodcaller", "starcall",
4-
"itemgetter0", "itemgetter1",
4+
"itemgetter0", "itemgetter1", "peek"
55
)
66

77
import operator

aptsources_cleanup/util/zipfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import errno
77
import functools
88
from zipfile import ZipInfo
9+
# from zipfile import * # NOQA
910
import zipfile as _zipfile
1011
__all__ = _zipfile.__all__
1112

publish.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,7 @@ Usage:
3636
export TWINE_PASSWORD=<pypi-password>
3737
3838
source $(secret_loader.sh)
39-
40-
MB_PYTHON_TAG=cp38-cp38m
41-
MB_PYTHON_TAG=cp37-cp37m
42-
MB_PYTHON_TAG=cp36-cp36m
43-
MB_PYTHON_TAG=cp35-cp35m
44-
MB_PYTHON_TAG=cp27-cp27mu
45-
46-
echo "MB_PYTHON_TAG = $MB_PYTHON_TAG"
47-
MB_PYTHON_TAG=$MB_PYTHON_TAG ./run_multibuild.sh
48-
DEPLOY_BRANCH=master DEPLOY_REMOTE=ibeis MB_PYTHON_TAG=$MB_PYTHON_TAG ./publish.sh yes
39+
DEPLOY_BRANCH=master DEPLOY_REMOTE=<yourmod> ./publish.sh yes
4940
5041
MB_PYTHON_TAG=py3-none-any ./publish.sh
5142
'''

setup.py

100644100755
File mode changed.

tools/get_module_file.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
"""Returns the paths of the files behind the given modules."""
33
# -*- coding: utf-8
44
from __future__ import absolute_import, print_function
5-
import sys, operator, importlib
5+
import sys
6+
import operator
7+
import importlib
68

79
try:
8-
from future_builtins import *
10+
from future_builtins import * # NOQA
911
except ImportError:
10-
pass
12+
pass
1113

1214

1315
print(
14-
*map(operator.attrgetter('__file__'),
15-
map(importlib.import_module, sys.argv[1:])),
16-
sep='\n')
16+
*map(operator.attrgetter('__file__'),
17+
map(importlib.import_module, sys.argv[1:])),
18+
sep='\n')

0 commit comments

Comments
 (0)