mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
feat: Installable using pipx
This commit is contained in:
parent
5957b44444
commit
4c847893b8
8 changed files with 38 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,3 +10,4 @@ patches.txt
|
|||
.directory
|
||||
.venv/
|
||||
__pycache__/
|
||||
ReVancedBuilder.egg-info/
|
||||
|
|
18
pyproject.toml
Normal file
18
pyproject.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "ReVancedBuilder"
|
||||
authors = [{ name = "Sayantan Santra", email = "sayantan.santra689@gmail.com" }]
|
||||
description = "A tool to automatically build latest releases of ReVanced apps"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
keywords = ["revanced", "patch"]
|
||||
license = { file = "LICENSE" }
|
||||
classifiers = ["Programming Language :: Python :: 3"]
|
||||
dependencies = ["requests", "packaging", "bs4"]
|
||||
version = "1.0"
|
||||
|
||||
[project.scripts]
|
||||
ReVancedBuilder = "ReVancedBuilder:ReVancedBuilder"
|
|
@ -1,4 +0,0 @@
|
|||
requests
|
||||
semver
|
||||
packaging
|
||||
bs4
|
|
@ -6,10 +6,12 @@
|
|||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
from packaging.version import Version
|
||||
import requests as req
|
||||
from bs4 import BeautifulSoup as bs
|
||||
from Cleanup import clean_exit
|
||||
|
||||
from ReVancedBuilder.Cleanup import clean_exit
|
||||
|
||||
# Determine the best version available to download
|
||||
def apkpure_best_match(version, soup):
|
|
@ -5,9 +5,10 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from Notifications import send_notif
|
||||
import time
|
||||
|
||||
from ReVancedBuilder.Notifications import send_notif
|
||||
|
||||
# Move apps to proper location
|
||||
def move_apps(appstate):
|
||||
build_config = appstate['build_config']
|
||||
|
@ -63,4 +64,4 @@ def clean_exit(msg, appstate, code=1):
|
|||
|
||||
# Delete the lockfile
|
||||
os.remove('lockfile')
|
||||
exit(code)
|
||||
sys.exit(code)
|
|
@ -7,9 +7,10 @@ import os
|
|||
import sys
|
||||
import configparser as cp
|
||||
import json
|
||||
from Cleanup import clean_exit
|
||||
import subprocess
|
||||
|
||||
from ReVancedBuilder.Cleanup import clean_exit
|
||||
|
||||
# Build the revanced apps
|
||||
def build_apps(appstate):
|
||||
build_config = appstate['build_config']
|
|
@ -6,20 +6,21 @@
|
|||
import sys
|
||||
import os
|
||||
import configparser as cp
|
||||
import requests as req
|
||||
import json
|
||||
from packaging.version import Version
|
||||
from APKPure_dl import *
|
||||
from JAVABuilder import *
|
||||
from datetime import datetime
|
||||
from Notifications import send_notif
|
||||
from Cleanup import *
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
import requests as req
|
||||
from packaging.version import Version
|
||||
from datetime import datetime
|
||||
|
||||
from ReVancedBuilder.APKPure_dl import apkpure_best_match, apkpure_dl, get_apks
|
||||
from ReVancedBuilder.JAVABuilder import build_apps
|
||||
from ReVancedBuilder.Notifications import send_notif
|
||||
from ReVancedBuilder.Cleanup import move_apps, clean_exit
|
||||
|
||||
# TODO: README
|
||||
# TODO: PATCHES_GUIDE.md (maybe delete it?)
|
||||
# TODO: Install using pip
|
||||
|
||||
# Update the ReVanced tools, if needed
|
||||
def update_tools(appstate):
|
||||
|
@ -92,9 +93,9 @@ appstate['timestamp'] = time.strftime('%Y%m%d%H%M%S')
|
|||
try:
|
||||
os.chdir(sys.argv[1])
|
||||
except IndexError:
|
||||
clean_exit('Please provide a working directory as argument!', appstate)
|
||||
sys.exit('Please provide a working directory as argument!')
|
||||
except FileNotFoundError:
|
||||
clean_exit('Invalid working directory provided!', appstate)
|
||||
sys.exit('Invalid working directory provided!')
|
||||
|
||||
# Try to make sure only one instance is running in a given working directory
|
||||
try:
|
Loading…
Reference in a new issue