forked from crustymonkey/py-sonic
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The initial release built a library that seems to have missed all the code. Hopefully this has addressed the packaging problems and better followed more of the packaging best practices. Signed-off-by: Eric B Munson <[email protected]>
- Loading branch information
Showing
6 changed files
with
78 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## 1.0.0 | ||
|
||
Initial release of forked library with Open Subsonic endpoint extensions supported. | ||
|
||
## 1.0.1 | ||
|
||
Python packaging learning curve. The previous version seems to have built empty | ||
libraries, hopefully this has fixed the problem. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,25 +17,42 @@ | |
along with py-opensonic. If not, see <http://www.gnu.org/licenses/> | ||
""" | ||
|
||
import os | ||
import re | ||
from pathlib import Path | ||
from setuptools import setup,find_packages | ||
|
||
req_file = os.path.join(os.path.dirname(__file__), 'requirements.txt') | ||
with open(req_file, encoding="utf-8") as file: | ||
requirements = [line for line in file if line] | ||
|
||
# read the contents of your README file | ||
this_directory = Path(__file__).parent | ||
long_description = (this_directory / "README.md").read_text() | ||
requirements = (this_directory / 'requirements.txt').read_text() | ||
|
||
# Get package __version__ in our namespace | ||
ver_path = (this_directory / 'src' / 'libopensonic' / '_version.py') | ||
verstr = 'unknown' | ||
try: | ||
verstrline = open(ver_path, "rt").read() | ||
except EnvironmentError: | ||
pass # Okay, there is no version file. | ||
else: | ||
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" | ||
mo = re.search(VSRE, verstrline, re.M) | ||
if mo: | ||
verstr = mo.group(1) | ||
else: | ||
raise RuntimeError("unable to find version in yourpackage/_version.py") | ||
|
||
setup(name='py-opensonic', | ||
version='1.0.0', | ||
version=verstr, | ||
author='Eric B. Munson', | ||
author_email='[email protected]', | ||
url='https://github.com/khers/py-opensonic', | ||
description='A python wrapper library for the Open Subsonic REST API. ' | ||
'https://opensubsonic.netlify.app/', | ||
long_description='This is a basic wrapper library for the Open Subsonic ' | ||
'REST API. This will allow you to connect to your server and retrieve ' | ||
'information and have it returned in basic Python types.', | ||
long_description=long_description, | ||
package_dir={'': 'src'}, | ||
packages=find_packages('src'), | ||
py_modules=['libopensonic'], | ||
install_requires=requirements, | ||
python_requires='>=3', | ||
classifiers=[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
This file is part of py-opensonic. | ||
py-opensonic is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
py-opensonic is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with py-opensonic. If not, see <http://www.gnu.org/licenses/> | ||
""" | ||
|
||
|
||
#Semantic versioning string for the library | ||
__version__ = '1.0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters