Skip to content

Commit 3e9e68c

Browse files
authored
Merge pull request #138 from marceljungle/main
Sync develop with main
2 parents d9dbdba + d446637 commit 3e9e68c

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ jobs:
2222
2323
- name: Analysing the code with pylint
2424
run: |
25-
pylint $(git ls-files '*.py')
25+
export PYTHONPATH="${PYTHONPATH}:$(pwd)/red_plex"
26+
pylint $(git ls-files 'red_plex/**/*.py')

setup.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@
44
import pathlib
55
from setuptools import setup, find_namespace_packages
66

7+
# Resolve the absolute path to the directory containing setup.py
78
here = pathlib.Path(__file__).parent.resolve()
9+
10+
# Read the long description from README.md
811
long_description = (here / "README.md").read_text(encoding="utf-8")
912

13+
# Construct the absolute path to __init__.py within your package
14+
init_py_path = here / "red_plex" / "__init__.py"
15+
1016
# Read the version from the package's __init__.py
11-
with open('red_plex/__init__.py', 'r', encoding="utf-8") as f:
17+
with open(init_py_path, 'r', encoding="utf-8") as f:
1218
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M)
1319
if version_match:
1420
version = version_match.group(1)
1521
else:
16-
raise RuntimeError("Unable to find version string.")
22+
# It's good to show the path it tried to open for easier debugging
23+
raise RuntimeError(f"Unable to find version string in {init_py_path}")
1724

1825
setup(
1926
name='red_plex',
@@ -24,8 +31,7 @@
2431
author='marceljungle',
2532
author_email='gigi.dan2011@gmail.com',
2633
url='https://github.com/marceljungle/red-plex',
27-
packages=find_namespace_packages(where="red_plex"),
28-
package_dir={"": "red_plex"},
34+
packages=find_namespace_packages(include=['red_plex*']),
2935
include_package_data=True,
3036
install_requires=[
3137
'plexapi',
@@ -37,7 +43,7 @@
3743
],
3844
entry_points='''
3945
[console_scripts]
40-
red-plex=infrastructure.cli.cli:main
46+
red-plex=red_plex.infrastructure.cli.cli:main
4147
''',
4248
classifiers=[
4349
'Programming Language :: Python :: 3',

0 commit comments

Comments
 (0)