M .builds/debian.yml => .builds/debian.yml +5 -0
@@ 3,6 3,8 @@ packages:
# - npm
- python3-pip
- python3-yaml
+secrets:
+ - 688f0848-0393-48ae-af1a-5403c0bd45d8
sources:
- https://git.sr.ht/~hristoast/mousikofidi
tasks:
@@ 35,3 37,6 @@ tasks:
- test-install: |
cd mousikofidi
make install
+ - upload-to-pypi: |
+ cd mousikofidi
+ ./pypi-upload.sh
M .gitignore => .gitignore +3 -0
@@ 8,3 8,6 @@ __pycache__
auto-save-list
tramp
.\#*
+MousikoFidi.egg-info
+build/
+dist/
M Makefile => Makefile +16 -1
@@ 3,7 3,11 @@ proj_dir := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
.DEFAULT_GOAL:= server
clean:
- rm -fr $(proj_dir)/__pycache__ $(proj_dir)/mousikofidi/__pycache__ $(proj_dir)/.pytest_cache
+ rm -fr $(proj_dir)/__pycache__ \
+ $(proj_dir)/mousikofidi/__pycache__ \
+ $(proj_dir)/.pytest_cache \
+ $(proj_dir)/MousikoFidi.egg-info \
+ $(proj_dir)/build $(proj_dir)/dist
install:
pip3 install --user --upgrade $(proj_dir)
@@ 14,6 18,17 @@ install-global:
uninstall:
pip3 uninstall MousikoFidi
+distribution-archive:
+ cd $(proj_dir) && python3 setup.py sdist bdist_wheel
+
+upload-distribution-archive-test:
+ test -d $(proj_dir)/dist || exit 1
+ cd $(proj_dir) && twine upload --repository-url https://test.pypi.org/legacy/ dist/*
+
+upload-distribution-archive:
+ @test -d $(proj_dir)/dist || exit 1
+ cd $(proj_dir) && twine upload dist/*
+
minify-css:
yuicompressor --type css $(proj_dir)/mousikofidi/static/css/fidi.css -o $(proj_dir)/mousikofidi/static/css/fidi.min.css --charset utf-8
yuicompressor --type css $(proj_dir)/mousikofidi/static/css/fidi-nes.css -o $(proj_dir)/mousikofidi/static/css/fidi-nes.min.css --charset utf-8
M dev-requirements.txt => dev-requirements.txt +2 -0
@@ 1,3 1,5 @@
black==19.3b0
flake8==3.6.0
pytest==5.0.1
+twine-1.14.0
+wheel==0.33.6
A pypi-upload.sh => pypi-upload.sh +18 -0
@@ 0,0 1,18 @@
+#!/bin/bash
+
+if git diff-index --quiet HEAD --; then
+ if git describe --exact-match --tags HEAD -- 2>/dev/null; then
+ cat <<EOF > ~/.pypirc
+[pypi]
+username = __token__
+password = $(cat ~/.fidipypi)
+EOF
+ make upload-distribution-archive
+ else
+ echo This is not a tag! Exiting...
+ exit 0
+ fi
+else
+ echo Local changes detected! Exiting...
+ exit 0
+fi
M setup.py => setup.py +36 -2
@@ 16,12 16,46 @@
from setuptools import setup
+with open("README.md", "r") as r:
+ long_desc = r.read()
+
setup(
name="MousikoFidi",
- version="0.15",
- long_description=__doc__,
+ version="0.16",
+ author="Hristos N. Triantafillou",
+ author_email="me@hristos.co",
+ description="MousikóFídi: Your Music Cloud",
+ long_description=long_desc,
+ long_description_content_type="text/markdown",
+ url="https://git.sr.ht/~hristoast/mousikofidi",
packages=["mousikofidi"],
include_package_data=True,
zip_safe=False,
+ classifiers=[
+ "Development Status :: 4 - Beta",
+ "Environment :: Web Environment",
+ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
+ "License :: OSI Approved",
+ "Natural Language :: English",
+ "Operating System :: POSIX :: Linux",
+ "Programming Language :: JavaScript",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.4",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Topic :: Internet :: WWW/HTTP",
+ "Topic :: Internet :: WWW/HTTP :: Browsers",
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Content Management System",
+ "Topic :: Multimedia",
+ "Topic :: Multimedia :: Sound/Audio",
+ "Topic :: Multimedia :: Sound/Audio :: Mixers",
+ "Topic :: Multimedia :: Sound/Audio :: Players",
+ "Topic :: Multimedia :: Sound/Audio :: Players :: MP3",
+ "Topic :: Multimedia :: Video",
+ "Topic :: Multimedia :: Video :: Display",
+ ],
install_requires=["Flask==1.0.3", "mutagen==1.42.0", "uWSGI==2.0.18"],
+ python_requires=">=3.4",
)