Skip to content

Commit 7855b51

Browse files
committed
build: added logic to publish to PyPI
1 parent 7ad4829 commit 7855b51

File tree

5 files changed

+146
-1
lines changed

5 files changed

+146
-1
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write # REQUIRED: for trusted publishing
12+
contents: read # REQUIRED: to checkout the repository
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build twine
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
# No need for user/password with trusted publishing
33+
# The action will use OIDC tokens automatically

MANIFEST.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include README.md
2+
include CHANGELOG.md
3+
include LICENSE
4+
include requirements.txt
5+
recursive-include plex2mix *.py
6+
recursive-exclude * __pycache__
7+
recursive-exclude * *.py[co]

plex2mix/init.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""
2+
Plex2Mix - Plex music downloader for DJs
3+
4+
🎵 Download playlists locally with deduplication, export to M3U8/JSON/iTunes
5+
formats, and manage your music library efficiently.
6+
7+
Copyright (C) 2025 anatosun
8+
9+
This program is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with this program. If not, see <https://www.gnu.org/licenses/>.
21+
"""
22+
23+
try:
24+
from ._version import version as __version__
25+
except ImportError:
26+
__version__ = "unknown"
27+
28+
__author__ = "anatosun"
29+
__email__ = "z4jyol8l@duck.com"
30+
__description__ = "Plex music downloader for DJs"
31+
__license__ = "GPL-3.0-or-later"
32+
33+
# Make main CLI function available at package level
34+
from .main import cli
35+
36+
__all__ = ["cli", "__version__"]

pyproject.toml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "plex2mix"
7+
authors = [
8+
{name = "anatosun", email = "z4jyol8l@duck.com"},
9+
]
10+
description = "🎵 Plex2Mix - A powerful Plex music downloader designed for DJs and music enthusiasts. Download playlists locally with track deduplication, export to multiple formats (M3U8, JSON, iTunes XML), and manage your music library with an intuitive interactive CLI. Perfect for importing into Rekordbox, Traktor, Mixxx, or iTunes. "
11+
readme = "README.md"
12+
license = {text = "GPL-3.0-or-later"}
13+
requires-python = ">=3.8"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: End Users/Desktop",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Topic :: Multimedia :: Sound/Audio",
26+
"Topic :: System :: Archiving",
27+
]
28+
keywords = ["plex", "music", "dj", "downloader", "playlist", "m3u8", "itunes"]
29+
dependencies = [
30+
"click>=8.0",
31+
"plexapi>=4.9",
32+
"pyyaml>=6.0",
33+
]
34+
dynamic = ["version"]
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"pytest>=7.0",
39+
"pytest-cov>=4.0",
40+
"black>=22.0",
41+
"flake8>=5.0",
42+
"mypy>=1.0",
43+
"build>=0.8",
44+
"twine>=4.0",
45+
]
46+
47+
[project.urls]
48+
Homepage = "https://github.com/anatosun/plex2mix"
49+
Repository = "https://github.com/anatosun/plex2mix"
50+
Documentation = "https://github.com/anatosun/plex2mix#readme"
51+
"Bug Reports" = "https://github.com/anatosun/plex2mix/issues"
52+
53+
[project.scripts]
54+
plex2mix = "plex2mix.main:cli"
55+
56+
[tool.setuptools]
57+
packages = ["plex2mix"]
58+
59+
[tool.setuptools_scm]
60+
write_to = "plex2mix/_version.py"
61+
62+
[tool.black]
63+
line-length = 88
64+
target-version = ['py38']
65+
66+
[tool.mypy]
67+
python_version = "3.8"
68+
warn_return_any = true
69+
warn_unused_configs = true

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="plex2mix",
5-
version="1.0.0",
5+
version="1.0.1",
66
description="Download Plex playlists and export them to various formats",
77
packages=find_packages(),
88
author='Anatosun',

0 commit comments

Comments
 (0)