xargcomplete 0.1__tar.gz → 0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xargcomplete-0.1 → xargcomplete-0.2}/PKG-INFO +2 -2
- {xargcomplete-0.1 → xargcomplete-0.2}/setup.py +15 -2
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete/attribute.py +1 -1
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete/complete.py +19 -14
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete.egg-info/PKG-INFO +2 -2
- xargcomplete-0.2/xargcomplete.egg-info/requires.txt +3 -0
- xargcomplete-0.1/xargcomplete.egg-info/requires.txt +0 -3
- {xargcomplete-0.1 → xargcomplete-0.2}/LICENSE +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/README.md +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/setup.cfg +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete/__init__.py +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete/command.py +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete.egg-info/SOURCES.txt +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete.egg-info/dependency_links.txt +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete.egg-info/entry_points.txt +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete.egg-info/top_level.txt +0 -0
- {xargcomplete-0.1 → xargcomplete-0.2}/xargcomplete.egg-info/zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xargcomplete
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2
|
|
4
4
|
Summary: Tab completion management
|
|
5
5
|
Home-page: https://github.com/bondbox/xargcomplete/
|
|
6
6
|
Author: Mingzhe Zou
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
16
16
|
Requires-Python: >=3.8
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: xkits-command>=0.
|
|
19
|
+
Requires-Dist: xkits-command>=0.4
|
|
20
20
|
Requires-Dist: tabulate
|
|
21
21
|
Requires-Dist: pip
|
|
22
22
|
|
|
@@ -4,6 +4,7 @@ from urllib.parse import urljoin
|
|
|
4
4
|
|
|
5
5
|
from setuptools import find_packages
|
|
6
6
|
from setuptools import setup
|
|
7
|
+
from setuptools.command.install import install
|
|
7
8
|
|
|
8
9
|
from xargcomplete.attribute import __author__
|
|
9
10
|
from xargcomplete.attribute import __author_email__
|
|
@@ -26,6 +27,14 @@ def all_requirements():
|
|
|
26
27
|
return requirements
|
|
27
28
|
|
|
28
29
|
|
|
30
|
+
class CustomInstallCommand(install):
|
|
31
|
+
"""Customized setuptools install command"""
|
|
32
|
+
|
|
33
|
+
def run(self):
|
|
34
|
+
install.run(self) # Run the standard installation
|
|
35
|
+
# Execute your custom code after installation
|
|
36
|
+
|
|
37
|
+
|
|
29
38
|
setup(
|
|
30
39
|
name=__project__,
|
|
31
40
|
version=__version__,
|
|
@@ -36,5 +45,9 @@ setup(
|
|
|
36
45
|
project_urls={"Source Code": __urlcode__,
|
|
37
46
|
"Bug Tracker": __urlbugs__,
|
|
38
47
|
"Documentation": __urldocs__},
|
|
39
|
-
packages=find_packages(include=["xargcomplete*"], exclude=["xargcomplete.unittest"]),
|
|
40
|
-
install_requires=all_requirements()
|
|
48
|
+
packages=find_packages(include=["xargcomplete*"], exclude=["xargcomplete.unittest"]), # noqa:E501
|
|
49
|
+
install_requires=all_requirements(),
|
|
50
|
+
cmdclass={
|
|
51
|
+
"install": CustomInstallCommand,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
@@ -4,7 +4,7 @@ from base64 import b16decode
|
|
|
4
4
|
from base64 import b16encode
|
|
5
5
|
from configparser import ConfigParser
|
|
6
6
|
import os
|
|
7
|
-
from typing import
|
|
7
|
+
from typing import Iterator
|
|
8
8
|
from typing import Optional
|
|
9
9
|
from typing import Set
|
|
10
10
|
|
|
@@ -77,17 +77,19 @@ class Collections:
|
|
|
77
77
|
__INITIALIZED: bool = False
|
|
78
78
|
|
|
79
79
|
def __init__(self):
|
|
80
|
-
if not self.__INITIALIZED:
|
|
80
|
+
if not self.__INITIALIZED: # pylint: disable=too-many-nested-blocks
|
|
81
81
|
self.__cmds: Set[str] = set()
|
|
82
|
-
for
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
for package in tuple({"argcomplete", "xarg-python", "xkits", command_project}): # noqa:E501
|
|
83
|
+
package_info: Optional[_PackageInfo] = self.get_package_info(package) # noqa:E501
|
|
84
|
+
if isinstance(package_info, _PackageInfo):
|
|
85
|
+
for _req in set(package_info.required_by):
|
|
86
|
+
_package_info: Optional[_PackageInfo] = self.get_package_info(_req) # noqa:E501
|
|
87
|
+
if isinstance(_package_info, _PackageInfo):
|
|
88
|
+
config = ConfigParser()
|
|
89
|
+
config.read_string(os.linesep.join(_package_info.entry_points)) # noqa:E501
|
|
90
|
+
if config.has_section("console_scripts"):
|
|
91
|
+
for _cmd in config["console_scripts"]:
|
|
92
|
+
self.__cmds.add(_cmd)
|
|
91
93
|
|
|
92
94
|
def __new__(cls):
|
|
93
95
|
if not cls.__INSTANCE:
|
|
@@ -95,9 +97,12 @@ class Collections:
|
|
|
95
97
|
return cls.__INSTANCE
|
|
96
98
|
|
|
97
99
|
@property
|
|
98
|
-
def cmds(self) ->
|
|
100
|
+
def cmds(self) -> Iterator[str]:
|
|
99
101
|
return iter(self.__cmds)
|
|
100
102
|
|
|
101
103
|
@classmethod
|
|
102
|
-
def get_package_info(cls, package_name: str) -> _PackageInfo:
|
|
103
|
-
|
|
104
|
+
def get_package_info(cls, package_name: str) -> Optional[_PackageInfo]:
|
|
105
|
+
for package_info in search_packages_info([package_name]):
|
|
106
|
+
if package_info.name == package_name:
|
|
107
|
+
return package_info
|
|
108
|
+
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xargcomplete
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2
|
|
4
4
|
Summary: Tab completion management
|
|
5
5
|
Home-page: https://github.com/bondbox/xargcomplete/
|
|
6
6
|
Author: Mingzhe Zou
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
16
16
|
Requires-Python: >=3.8
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: xkits-command>=0.
|
|
19
|
+
Requires-Dist: xkits-command>=0.4
|
|
20
20
|
Requires-Dist: tabulate
|
|
21
21
|
Requires-Dist: pip
|
|
22
22
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|