Skip to content

Commit

Permalink
make ready for pypi.org
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Jan 4, 2025
1 parent a3d56b9 commit 9db4c97
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
__pycache__/
.idea/

*.egg-info
dist/
build/
.DS_Store
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -rf build dist *.egg-info
python3 setup.py sdist bdist_wheel
3 changes: 3 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 -m pip install -e .
3 changes: 3 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

twine upload dist/*
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from setuptools import setup, find_packages

from sync import __version__

setup(
name="mmrl-util",
version=__version__.get_version(),
description="A tool to build your own Magisk Modules Repository",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Der_Googler & Sanmer",
author_email="[email protected]",
url="https://github.com/Googlers-Repo/magisk-modules-repo-util",
license="GPL-3.0",
packages=find_packages(),
install_requires=[
"pygithub>=1.59.0",
"python-dateutil>=2.8.2",
"requests>=2.31.0",
"tabulate>=0.9.0",
"gitpython>=3.1.37",
"validators>=0.28.3",
"pyyaml>=6.0.2",
"python-magic>=0.4.27",
],
entry_points={
"console_scripts": [
"mmrl-util=sync.__main__:main",
],
},
python_requires=">=3.7",
)
10 changes: 5 additions & 5 deletions cli.py → sync/__main__.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
from pathlib import Path
from signal import SIGINT, signal

from sync.cli import Main
from .cli import Main


# noinspection PyUnresolvedReferences,PyProtectedMember
def signal_handler(*args):
os._exit(1)


if __name__ == "__main__":
def main():
signal(SIGINT, signal_handler)
cwd_folder = Path(__name__).resolve().parent

Expand All @@ -24,3 +21,6 @@ def signal_handler(*args):

Main.set_default_args(root_folder=cwd_folder, github_token=github_token)
sys.exit(Main.exec())

if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions sync/__version__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
def get_version() -> str:
return "2.10.9"
return "2.10.11"


def get_version_code() -> int:
return 291
return 293


__all__ = [
Expand Down

0 comments on commit 9db4c97

Please sign in to comment.