mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-26 12:48:36 -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
|
.directory
|
||||||
.venv/
|
.venv/
|
||||||
__pycache__/
|
__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 os
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from packaging.version import Version
|
from packaging.version import Version
|
||||||
import requests as req
|
import requests as req
|
||||||
from bs4 import BeautifulSoup as bs
|
from bs4 import BeautifulSoup as bs
|
||||||
from Cleanup import clean_exit
|
|
||||||
|
from ReVancedBuilder.Cleanup import clean_exit
|
||||||
|
|
||||||
# Determine the best version available to download
|
# Determine the best version available to download
|
||||||
def apkpure_best_match(version, soup):
|
def apkpure_best_match(version, soup):
|
|
@ -5,9 +5,10 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from Notifications import send_notif
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from ReVancedBuilder.Notifications import send_notif
|
||||||
|
|
||||||
# Move apps to proper location
|
# Move apps to proper location
|
||||||
def move_apps(appstate):
|
def move_apps(appstate):
|
||||||
build_config = appstate['build_config']
|
build_config = appstate['build_config']
|
||||||
|
@ -63,4 +64,4 @@ def clean_exit(msg, appstate, code=1):
|
||||||
|
|
||||||
# Delete the lockfile
|
# Delete the lockfile
|
||||||
os.remove('lockfile')
|
os.remove('lockfile')
|
||||||
exit(code)
|
sys.exit(code)
|
|
@ -7,9 +7,10 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import configparser as cp
|
import configparser as cp
|
||||||
import json
|
import json
|
||||||
from Cleanup import clean_exit
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from ReVancedBuilder.Cleanup import clean_exit
|
||||||
|
|
||||||
# Build the revanced apps
|
# Build the revanced apps
|
||||||
def build_apps(appstate):
|
def build_apps(appstate):
|
||||||
build_config = appstate['build_config']
|
build_config = appstate['build_config']
|
|
@ -6,20 +6,21 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import configparser as cp
|
import configparser as cp
|
||||||
import requests as req
|
|
||||||
import json
|
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 logging
|
||||||
import subprocess
|
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: README
|
||||||
# TODO: PATCHES_GUIDE.md (maybe delete it?)
|
# TODO: PATCHES_GUIDE.md (maybe delete it?)
|
||||||
# TODO: Install using pip
|
|
||||||
|
|
||||||
# Update the ReVanced tools, if needed
|
# Update the ReVanced tools, if needed
|
||||||
def update_tools(appstate):
|
def update_tools(appstate):
|
||||||
|
@ -92,9 +93,9 @@ appstate['timestamp'] = time.strftime('%Y%m%d%H%M%S')
|
||||||
try:
|
try:
|
||||||
os.chdir(sys.argv[1])
|
os.chdir(sys.argv[1])
|
||||||
except IndexError:
|
except IndexError:
|
||||||
clean_exit('Please provide a working directory as argument!', appstate)
|
sys.exit('Please provide a working directory as argument!')
|
||||||
except FileNotFoundError:
|
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 to make sure only one instance is running in a given working directory
|
||||||
try:
|
try:
|
Loading…
Reference in a new issue