lscom 0.0.2__tar.gz → 0.0.3__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.
lscom-0.0.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Josh Schmelzle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
lscom-0.0.3/PKG-INFO ADDED
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.2
2
+ Name: lscom
3
+ Version: 0.0.3
4
+ Summary: list available active COM ports
5
+ Home-page: https://github.com/joshschmelzle/lscom
6
+ Author: Josh Schmelzle
7
+ Author-email: josh@joshschmelzle.com
8
+ License: MIT
9
+ Keywords: com,com ports,serial
10
+ Classifier: Natural Language :: English
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Programming Language :: Python :: 3.2
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Topic :: Utilities
16
+ Requires-Python: >3.2,
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: pyserial
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: keywords
27
+ Dynamic: license
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ ![pypi-badge](https://img.shields.io/pypi/v/lscom) ![pypi-format](https://img.shields.io/pypi/format/lscom) ![pypi-implementation](https://img.shields.io/pypi/implementation/lscom) ![pypi-version](https://img.shields.io/pypi/pyversions/lscom) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/joshschmelzle/lscom/blob/main/CODE_OF_CONDUCT.md)
33
+
34
+ # lscom: list and discover available COM ports
35
+
36
+ More quickly identify which COM ports are available for use. Any COM ports already in use will not be listed. `lscom` should work cross platform (Linux, macOS, Windows), but has not been extensively tested. Have a problem? Open an issue.
37
+
38
+ ## Usage Example
39
+
40
+ ```
41
+ $ lscom
42
+ ['COM3']
43
+ ```
44
+
45
+ ## Installation from PyPI
46
+
47
+ ```bash
48
+ python -m pip install lscom
49
+ ```
50
+
51
+ ## Local Installation Example
52
+
53
+ To install manually:
54
+
55
+ 1. Clone repository.
56
+
57
+ 2. Open the terminal to the root of the repository.
58
+
59
+ 3. Run-
60
+
61
+ ```bash
62
+ python -m pip install .
63
+ ```
64
+
65
+ You should now be able to run `lscom` from your terminal
66
+
67
+ If you can't, check and make sure the scripts directory is included in the system path environment variable.
68
+
69
+ To remove:
70
+
71
+ ```bash
72
+ python -m pip uninstall lscom
73
+ ```
@@ -1,42 +1,42 @@
1
- ![pypi-badge](https://img.shields.io/pypi/v/lscom) ![pypi-format](https://img.shields.io/pypi/format/lscom) ![pypi-implementation](https://img.shields.io/pypi/implementation/lscom) ![pypi-version](https://img.shields.io/pypi/pyversions/lscom) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/joshschmelzle/lscom/blob/main/CODE_OF_CONDUCT.md)
2
-
3
- # lscom: list and discover available COM ports
4
-
5
- More quickly identify which COM ports are available for use. Any COM ports already in use will not be listed. `lscom` should work cross platform (Linux, macOS, Windows), but has not been extensively tested. Have a problem? Open an issue.
6
-
7
- ## Usage Example
8
-
9
- ```
10
- $ lscom
11
- ['COM3']
12
- ```
13
-
14
- ## PyPI Installation
15
-
16
- ```bash
17
- python -m pip install lscom
18
- ```
19
-
20
- ## Local Installation Example
21
-
22
- To install manually:
23
-
24
- 1. Clone repository.
25
-
26
- 2. Open the terminal to the root of the repository.
27
-
28
- 3. Run-
29
-
30
- ```bash
31
- python -m pip install .
32
- ```
33
-
34
- You should now be able to run `lscom` from your terminal
35
-
36
- If you can't, check and make sure the scripts directory is included in the system path environment variable.
37
-
38
- To remove:
39
-
40
- ```bash
41
- python -m pip uninstall lscom
42
- ```
1
+ ![pypi-badge](https://img.shields.io/pypi/v/lscom) ![pypi-format](https://img.shields.io/pypi/format/lscom) ![pypi-implementation](https://img.shields.io/pypi/implementation/lscom) ![pypi-version](https://img.shields.io/pypi/pyversions/lscom) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/joshschmelzle/lscom/blob/main/CODE_OF_CONDUCT.md)
2
+
3
+ # lscom: list and discover available COM ports
4
+
5
+ More quickly identify which COM ports are available for use. Any COM ports already in use will not be listed. `lscom` should work cross platform (Linux, macOS, Windows), but has not been extensively tested. Have a problem? Open an issue.
6
+
7
+ ## Usage Example
8
+
9
+ ```
10
+ $ lscom
11
+ ['COM3']
12
+ ```
13
+
14
+ ## Installation from PyPI
15
+
16
+ ```bash
17
+ python -m pip install lscom
18
+ ```
19
+
20
+ ## Local Installation Example
21
+
22
+ To install manually:
23
+
24
+ 1. Clone repository.
25
+
26
+ 2. Open the terminal to the root of the repository.
27
+
28
+ 3. Run-
29
+
30
+ ```bash
31
+ python -m pip install .
32
+ ```
33
+
34
+ You should now be able to run `lscom` from your terminal
35
+
36
+ If you can't, check and make sure the scripts directory is included in the system path environment variable.
37
+
38
+ To remove:
39
+
40
+ ```bash
41
+ python -m pip uninstall lscom
42
+ ```
@@ -1,4 +1,4 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # | _ _ _ ._ _
4
- # | _> (_ (_) | | |
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # | _ _ _ ._ _
4
+ # | _> (_ (_) | | |
@@ -1,50 +1,50 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # | _ _ _ ._ _
4
- # | _> (_ (_) | | |
5
-
6
- """
7
- lscom
8
- ~~~~~
9
-
10
- list available serial ports
11
- """
12
-
13
- import sys
14
-
15
- from lscom import helpers
16
- from lscom.__version__ import __title__, __version__
17
- from lscom.app import run
18
-
19
- PY_MAJOR = 3
20
- PY_MINOR = 2
21
- MINIMUM_PYTHON_VERISON = "3.2"
22
-
23
-
24
- def check_python_version(): # type: ignore
25
- """Use old-school .format() method for if someone uses with very old Python."""
26
- msg = """
27
-
28
- {title} version {pkgv} requires Python version {pyv} or higher.
29
- """.format(
30
- title=__title__, pkgv=__version__, pyv=MINIMUM_PYTHON_VERISON
31
- )
32
- if sys.version_info < (PY_MAJOR, PY_MINOR):
33
- raise ValueError(msg)
34
-
35
-
36
- def main():
37
- parser = helpers.setup_parser()
38
- args = parser.parse_args() # noqa: F841
39
- run()
40
-
41
-
42
- def init():
43
- check_python_version() # type: ignore
44
-
45
- if __name__ == "__main__":
46
- main()
47
- sys.exit(0)
48
-
49
-
50
- init()
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # | _ _ _ ._ _
4
+ # | _> (_ (_) | | |
5
+
6
+ """
7
+ lscom
8
+ ~~~~~
9
+
10
+ list available serial ports
11
+ """
12
+
13
+ import sys
14
+
15
+ from lscom import helpers
16
+ from lscom.__version__ import __title__, __version__
17
+ from lscom.app import run
18
+
19
+ PY_MAJOR = 3
20
+ PY_MINOR = 2
21
+ MINIMUM_PYTHON_VERISON = "3.2"
22
+
23
+
24
+ def check_python_version(): # type: ignore
25
+ """Use old-school .format() method for if someone uses with very old Python."""
26
+ msg = """
27
+
28
+ {title} version {pkgv} requires Python version {pyv} or higher.
29
+ """.format(
30
+ title=__title__, pkgv=__version__, pyv=MINIMUM_PYTHON_VERISON
31
+ )
32
+ if sys.version_info < (PY_MAJOR, PY_MINOR):
33
+ raise ValueError(msg)
34
+
35
+
36
+ def main():
37
+ parser = helpers.setup_parser()
38
+ args = parser.parse_args() # noqa: F841
39
+ run()
40
+
41
+
42
+ def init():
43
+ check_python_version() # type: ignore
44
+
45
+ if __name__ == "__main__":
46
+ main()
47
+ sys.exit(0)
48
+
49
+
50
+ init()
@@ -1,14 +1,14 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # | _ _ _ ._ _
4
- # | _> (_ (_) | | |
5
-
6
- """ version information for lscom """
7
-
8
- __title__ = "lscom"
9
- __description__ = "list available active COM ports"
10
- __url__ = "https://github.com/joshschmelzle/lscom"
11
- __version__ = "0.0.2"
12
- __author__ = "Josh Schmelzle"
13
- __author_email__ = "josh@joshschmelzle.com"
14
- __license__ = "MIT"
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # | _ _ _ ._ _
4
+ # | _> (_ (_) | | |
5
+
6
+ """ version information for lscom """
7
+
8
+ __title__ = "lscom"
9
+ __description__ = "list available active COM ports"
10
+ __url__ = "https://github.com/joshschmelzle/lscom"
11
+ __version__ = "0.0.3"
12
+ __author__ = "Josh Schmelzle"
13
+ __author_email__ = "josh@joshschmelzle.com"
14
+ __license__ = "MIT"
@@ -1,68 +1,109 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # | _ _ _ ._ _
4
- # | _> (_ (_) | | |
5
-
6
- """
7
- lscom.app
8
- ~~~~~~~~~
9
-
10
- main app code
11
- """
12
-
13
- import glob
14
- import sys
15
-
16
- try:
17
- import serial # type: ignore
18
- except ModuleNotFoundError:
19
- print("required module pyserial not found... exiting...")
20
- sys.exit(-1)
21
-
22
-
23
- class lscom:
24
- """Main application class."""
25
-
26
- def get_active_serial_port_names(self):
27
- """Lists serial port names
28
-
29
- :raises EnvironmentError:
30
- On unsupported or unknown platforms
31
- :returns:
32
- A list of the serial ports available on the system
33
- """
34
- if sys.platform.startswith("win"):
35
- ports = ["COM%s" % (i + 1) for i in range(256)]
36
- elif sys.platform.startswith("linux") or sys.platform.startswith("cygwin"):
37
- # this excludes your current terminal "/dev/tty"
38
- ports = glob.glob("/dev/tty[A-Za-z]*")
39
- elif sys.platform.startswith("darwin"):
40
- ports = glob.glob("/dev/tty.*")
41
- else:
42
- raise EnvironmentError(
43
- "appears to be an unsupported platform", sys.platform
44
- )
45
-
46
- result = []
47
- for port in ports:
48
- try:
49
- _serial = serial.Serial(port)
50
- _serial.close()
51
- result.append(port)
52
- except (OSError, serial.SerialException):
53
- pass
54
- return result
55
-
56
- def run(self):
57
- serials = self.get_active_serial_port_names()
58
- if len(serials) > 0:
59
- print("{0} serial ports detected and available:".format(len(serials)))
60
- for _ in serials:
61
- print(_)
62
- else:
63
- print("no available serial ports detected")
64
-
65
-
66
- def run() -> None:
67
- """Run the application."""
68
- lscom().run()
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # | _ _ _ ._ _
4
+ # | _> (_ (_) | | |
5
+
6
+ """
7
+ lscom.app
8
+ ~~~~~~~~~
9
+
10
+ main app code
11
+ """
12
+
13
+ import glob
14
+ import grp
15
+ import os
16
+ import sys
17
+
18
+ try:
19
+ import serial # type: ignore
20
+ except ModuleNotFoundError:
21
+ print("required module pyserial not found... exiting...")
22
+ sys.exit(-1)
23
+
24
+
25
+ class lscom:
26
+ """Main application class."""
27
+
28
+ def check_serial_permissions(self):
29
+ """
30
+ Check if current user has permissions for serial port access on Linux.
31
+
32
+ Add to dialout:
33
+ sudo usermod -a -G dialout $USER
34
+
35
+ Remove from dialout:
36
+ sudo gpasswd -d $USER dialout
37
+
38
+ :returns:
39
+ Tuple: (bool, message)
40
+ """
41
+ if not sys.platform.startswith("linux"):
42
+ return True, "Permission check required"
43
+
44
+ try:
45
+ dialout = grp.getgrnam("dialout")
46
+ groups = os.getgroups()
47
+ user = os.getlogin()
48
+ if dialout.gr_gid in groups:
49
+ return True, f"{user} has dialout group access"
50
+ else:
51
+ return (
52
+ False,
53
+ f"""
54
+ {user} is not in the dialout group. To fix:
55
+ 1. Run: sudo usermod -a -G dialout {user}
56
+ 2. Log out and back in for the changes to take effect
57
+ """,
58
+ )
59
+ except KeyError:
60
+ return False, "dialout group not found"
61
+ except Exception as error:
62
+ return False, f"Error checking permissions: {str(error)}"
63
+
64
+ def get_active_serial_port_names(self):
65
+ """Lists serial port names
66
+
67
+ :raises EnvironmentError:
68
+ On unsupported or unknown platforms
69
+ :returns:
70
+ A list of the serial ports available on the system
71
+ """
72
+ has_permissions, message = self.check_serial_permissions()
73
+ if not has_permissions:
74
+ print(message)
75
+ if sys.platform.startswith("win"):
76
+ ports = ["COM%s" % (i + 1) for i in range(256)]
77
+ elif sys.platform.startswith("linux") or sys.platform.startswith("cygwin"):
78
+ # this excludes your current terminal "/dev/tty"
79
+ ports = glob.glob("/dev/tty[A-Za-z]*")
80
+ elif sys.platform.startswith("darwin"):
81
+ ports = glob.glob("/dev/tty.*")
82
+ else:
83
+ raise EnvironmentError(
84
+ "appears to be an unsupported platform", sys.platform
85
+ )
86
+
87
+ result = []
88
+ for port in ports:
89
+ try:
90
+ _serial = serial.Serial(port)
91
+ _serial.close()
92
+ result.append(port)
93
+ except (OSError, serial.SerialException):
94
+ pass
95
+ return result
96
+
97
+ def run(self):
98
+ serials = self.get_active_serial_port_names()
99
+ if len(serials) > 0:
100
+ print("{0} serial ports detected and available:".format(len(serials)))
101
+ for _ in serials:
102
+ print(_)
103
+ else:
104
+ print("no available serial ports detected")
105
+
106
+
107
+ def run() -> None:
108
+ """Run the application."""
109
+ lscom().run()
@@ -1,27 +1,27 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # | _ _ _ ._ _
4
- # | _> (_ (_) | | |
5
-
6
- """
7
- lscom.helpers
8
- ~~~~~~~~~~~~~
9
-
10
- helper functions
11
- """
12
-
13
- import argparse
14
-
15
- from lscom.__version__ import __version__
16
-
17
-
18
- def setup_parser():
19
- """Set default values and handle arg parser."""
20
- parser = argparse.ArgumentParser(
21
- formatter_class=argparse.RawDescriptionHelpFormatter,
22
- description="lscom: list and discover available COM ports",
23
- )
24
- parser.add_argument(
25
- "--version", "-v", action="version", version=f"lscom version is {__version__}"
26
- )
27
- return parser
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # | _ _ _ ._ _
4
+ # | _> (_ (_) | | |
5
+
6
+ """
7
+ lscom.helpers
8
+ ~~~~~~~~~~~~~
9
+
10
+ helper functions
11
+ """
12
+
13
+ import argparse
14
+
15
+ from lscom.__version__ import __version__
16
+
17
+
18
+ def setup_parser():
19
+ """Set default values and handle arg parser."""
20
+ parser = argparse.ArgumentParser(
21
+ formatter_class=argparse.RawDescriptionHelpFormatter,
22
+ description="lscom: list and discover available COM ports",
23
+ )
24
+ parser.add_argument(
25
+ "--version", "-v", action="version", version=f"lscom version is {__version__}"
26
+ )
27
+ return parser
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.2
2
+ Name: lscom
3
+ Version: 0.0.3
4
+ Summary: list available active COM ports
5
+ Home-page: https://github.com/joshschmelzle/lscom
6
+ Author: Josh Schmelzle
7
+ Author-email: josh@joshschmelzle.com
8
+ License: MIT
9
+ Keywords: com,com ports,serial
10
+ Classifier: Natural Language :: English
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Programming Language :: Python :: 3.2
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Topic :: Utilities
16
+ Requires-Python: >3.2,
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: pyserial
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: keywords
27
+ Dynamic: license
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ ![pypi-badge](https://img.shields.io/pypi/v/lscom) ![pypi-format](https://img.shields.io/pypi/format/lscom) ![pypi-implementation](https://img.shields.io/pypi/implementation/lscom) ![pypi-version](https://img.shields.io/pypi/pyversions/lscom) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/joshschmelzle/lscom/blob/main/CODE_OF_CONDUCT.md)
33
+
34
+ # lscom: list and discover available COM ports
35
+
36
+ More quickly identify which COM ports are available for use. Any COM ports already in use will not be listed. `lscom` should work cross platform (Linux, macOS, Windows), but has not been extensively tested. Have a problem? Open an issue.
37
+
38
+ ## Usage Example
39
+
40
+ ```
41
+ $ lscom
42
+ ['COM3']
43
+ ```
44
+
45
+ ## Installation from PyPI
46
+
47
+ ```bash
48
+ python -m pip install lscom
49
+ ```
50
+
51
+ ## Local Installation Example
52
+
53
+ To install manually:
54
+
55
+ 1. Clone repository.
56
+
57
+ 2. Open the terminal to the root of the repository.
58
+
59
+ 3. Run-
60
+
61
+ ```bash
62
+ python -m pip install .
63
+ ```
64
+
65
+ You should now be able to run `lscom` from your terminal
66
+
67
+ If you can't, check and make sure the scripts directory is included in the system path environment variable.
68
+
69
+ To remove:
70
+
71
+ ```bash
72
+ python -m pip uninstall lscom
73
+ ```
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  setup.py
@@ -1,3 +1,2 @@
1
1
  [console_scripts]
2
2
  lscom = lscom.__main__:main
3
-
@@ -0,0 +1,2 @@
1
+ [tool.isort]
2
+ profile = "black"
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,61 +1,66 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- import os
4
- import sys
5
-
6
- from setuptools import find_packages, setup
7
-
8
- here = os.path.abspath(os.path.dirname(__file__))
9
-
10
- # 'python setup.py build' shortcut
11
- if sys.argv[-1] == "build":
12
- os.system("python setup.py sdist bdist_wheel")
13
- sys.exit()
14
-
15
- # 'python setup.py check' shortcut
16
- if sys.argv[-1] == "check":
17
- os.system("python -m twine check dist/*")
18
- sys.exit()
19
-
20
- # load the package's __version__.py module as a dictionary
21
- about = {}
22
- with open(os.path.join(here, "lscom", "__version__.py")) as f:
23
- exec(f.read(), about)
24
-
25
- try:
26
- with open("README.md", "r") as f:
27
- readme = f.read()
28
- except FileNotFoundError:
29
- long_description = about["__description__"]
30
-
31
- requires = ["pyserial"]
32
-
33
- setup(
34
- name=about["__title__"],
35
- version=about["__version__"],
36
- description=about["__description__"],
37
- long_description=readme,
38
- long_description_content_type="text/markdown",
39
- author=about["__author__"],
40
- author_email=about["__author_email__"],
41
- url=about["__url__"],
42
- keywords=["com", "com ports", "serial"],
43
- python_requires=">3.2,",
44
- license=about["__license__"],
45
- classifiers=[
46
- "Natural Language :: English",
47
- "Development Status :: 3 - Alpha",
48
- "Programming Language :: Python :: 3.2",
49
- "Intended Audience :: Developers",
50
- "Intended Audience :: System Administrators",
51
- "Topic :: Utilities",
52
- ],
53
- packages=find_packages(
54
- exclude=(
55
- "tests",
56
- "test",
57
- )
58
- ),
59
- install_requires=requires,
60
- entry_points={"console_scripts": ["lscom=lscom.__main__:main"]},
61
- )
1
+ # -*- coding: utf-8 -*-
2
+
3
+ import os
4
+ import sys
5
+
6
+ from setuptools import find_packages, setup
7
+
8
+ here = os.path.abspath(os.path.dirname(__file__))
9
+
10
+ # 'python setup.py build' shortcut
11
+ if sys.argv[-1] == "build":
12
+ os.system("python setup.py sdist bdist_wheel")
13
+ sys.exit()
14
+
15
+ # 'python setup.py check' shortcut
16
+ if sys.argv[-1] == "check":
17
+ os.system("python -m twine check dist/*")
18
+ sys.exit()
19
+
20
+ # 'python setup.py deploy' shortcut
21
+ if sys.argv[-1] == "deploy":
22
+ os.system("python -m twine upload dist/*")
23
+ sys.exit()
24
+
25
+ # load the package's __version__.py module as a dictionary
26
+ about = {}
27
+ with open(os.path.join(here, "lscom", "__version__.py")) as f:
28
+ exec(f.read(), about)
29
+
30
+ try:
31
+ with open("README.md", "r") as f:
32
+ readme = f.read()
33
+ except FileNotFoundError:
34
+ long_description = about["__description__"]
35
+
36
+ requires = ["pyserial"]
37
+
38
+ setup(
39
+ name=about["__title__"],
40
+ version=about["__version__"],
41
+ description=about["__description__"],
42
+ long_description=readme,
43
+ long_description_content_type="text/markdown",
44
+ author=about["__author__"],
45
+ author_email=about["__author_email__"],
46
+ url=about["__url__"],
47
+ keywords=["com", "com ports", "serial"],
48
+ python_requires=">3.2,",
49
+ license=about["__license__"],
50
+ classifiers=[
51
+ "Natural Language :: English",
52
+ "Development Status :: 3 - Alpha",
53
+ "Programming Language :: Python :: 3.2",
54
+ "Intended Audience :: Developers",
55
+ "Intended Audience :: System Administrators",
56
+ "Topic :: Utilities",
57
+ ],
58
+ packages=find_packages(
59
+ exclude=(
60
+ "tests",
61
+ "test",
62
+ )
63
+ ),
64
+ install_requires=requires,
65
+ entry_points={"console_scripts": ["lscom=lscom.__main__:main"]},
66
+ )
lscom-0.0.2/PKG-INFO DELETED
@@ -1,61 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: lscom
3
- Version: 0.0.2
4
- Summary: list available active COM ports
5
- Home-page: https://github.com/joshschmelzle/lscom
6
- Author: Josh Schmelzle
7
- Author-email: josh@joshschmelzle.com
8
- License: MIT
9
- Description: ![pypi-badge](https://img.shields.io/pypi/v/lscom) ![pypi-format](https://img.shields.io/pypi/format/lscom) ![pypi-implementation](https://img.shields.io/pypi/implementation/lscom) ![pypi-version](https://img.shields.io/pypi/pyversions/lscom) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/joshschmelzle/lscom/blob/main/CODE_OF_CONDUCT.md)
10
-
11
- # lscom: list and discover available COM ports
12
-
13
- More quickly identify which COM ports are available for use. Any COM ports already in use will not be listed. `lscom` should work cross platform (Linux, macOS, Windows), but has not been extensively tested. Have a problem? Open an issue.
14
-
15
- ## Usage Example
16
-
17
- ```
18
- $ lscom
19
- ['COM3']
20
- ```
21
-
22
- ## PyPI Installation
23
-
24
- ```bash
25
- python -m pip install lscom
26
- ```
27
-
28
- ## Local Installation Example
29
-
30
- To install manually:
31
-
32
- 1. Clone repository.
33
-
34
- 2. Open the terminal to the root of the repository.
35
-
36
- 3. Run-
37
-
38
- ```bash
39
- python -m pip install .
40
- ```
41
-
42
- You should now be able to run `lscom` from your terminal
43
-
44
- If you can't, check and make sure the scripts directory is included in the system path environment variable.
45
-
46
- To remove:
47
-
48
- ```bash
49
- python -m pip uninstall lscom
50
- ```
51
-
52
- Keywords: com,com ports,serial
53
- Platform: UNKNOWN
54
- Classifier: Natural Language :: English
55
- Classifier: Development Status :: 3 - Alpha
56
- Classifier: Programming Language :: Python :: 3.2
57
- Classifier: Intended Audience :: Developers
58
- Classifier: Intended Audience :: System Administrators
59
- Classifier: Topic :: Utilities
60
- Requires-Python: >3.2,
61
- Description-Content-Type: text/markdown
@@ -1,61 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: lscom
3
- Version: 0.0.2
4
- Summary: list available active COM ports
5
- Home-page: https://github.com/joshschmelzle/lscom
6
- Author: Josh Schmelzle
7
- Author-email: josh@joshschmelzle.com
8
- License: MIT
9
- Description: ![pypi-badge](https://img.shields.io/pypi/v/lscom) ![pypi-format](https://img.shields.io/pypi/format/lscom) ![pypi-implementation](https://img.shields.io/pypi/implementation/lscom) ![pypi-version](https://img.shields.io/pypi/pyversions/lscom) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/joshschmelzle/lscom/blob/main/CODE_OF_CONDUCT.md)
10
-
11
- # lscom: list and discover available COM ports
12
-
13
- More quickly identify which COM ports are available for use. Any COM ports already in use will not be listed. `lscom` should work cross platform (Linux, macOS, Windows), but has not been extensively tested. Have a problem? Open an issue.
14
-
15
- ## Usage Example
16
-
17
- ```
18
- $ lscom
19
- ['COM3']
20
- ```
21
-
22
- ## PyPI Installation
23
-
24
- ```bash
25
- python -m pip install lscom
26
- ```
27
-
28
- ## Local Installation Example
29
-
30
- To install manually:
31
-
32
- 1. Clone repository.
33
-
34
- 2. Open the terminal to the root of the repository.
35
-
36
- 3. Run-
37
-
38
- ```bash
39
- python -m pip install .
40
- ```
41
-
42
- You should now be able to run `lscom` from your terminal
43
-
44
- If you can't, check and make sure the scripts directory is included in the system path environment variable.
45
-
46
- To remove:
47
-
48
- ```bash
49
- python -m pip uninstall lscom
50
- ```
51
-
52
- Keywords: com,com ports,serial
53
- Platform: UNKNOWN
54
- Classifier: Natural Language :: English
55
- Classifier: Development Status :: 3 - Alpha
56
- Classifier: Programming Language :: Python :: 3.2
57
- Classifier: Intended Audience :: Developers
58
- Classifier: Intended Audience :: System Administrators
59
- Classifier: Topic :: Utilities
60
- Requires-Python: >3.2,
61
- Description-Content-Type: text/markdown
@@ -1,2 +0,0 @@
1
- [tool.isort]
2
- profile = "black"
File without changes