Fixed bux for debian, setup.py: pipx install
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
parent
76cbda80cc
commit
be404eb5e3
|
@ -28,12 +28,15 @@ def init_gh_token():
|
|||
|
||||
def load_gh_token(path: Path):
|
||||
global token
|
||||
log.info(f"Loading secret github token")
|
||||
if not path.is_file():
|
||||
log.warning(f"Token load did not pass - file not found")
|
||||
return
|
||||
# load token
|
||||
token = path.read_text().strip()
|
||||
try:
|
||||
log.info(f"Loading secret github token")
|
||||
if not path.is_file():
|
||||
log.warning(f"Token load did not pass - file not found")
|
||||
return
|
||||
# load token
|
||||
token = path.read_text().strip()
|
||||
except Exception as e:
|
||||
log.warning(f"Token reading error: {e.__str__()}")
|
||||
|
||||
|
||||
def config_try_override(config_writer: GitConfigParser, section: str, option: str, value: str):
|
||||
|
|
|
@ -21,7 +21,7 @@ def clone_checkout(
|
|||
log.critical(f"Recursion limit reached! breaking")
|
||||
return False
|
||||
|
||||
repo = Repo().clone_from(source.as_posix(), to_path = target.as_posix(), progress = GitRemoteProgress(), bare = False)
|
||||
repo = Repo.clone_from(source.as_posix(), to_path = target.as_posix(), progress = GitRemoteProgress(), bare = False)
|
||||
if reference:
|
||||
log.debug(f"Finding reference: {reference}")
|
||||
try:
|
||||
|
|
11
setup.py
11
setup.py
|
@ -1,6 +1,14 @@
|
|||
from setuptools import setup, find_packages
|
||||
import os
|
||||
|
||||
print("Packages:", find_packages())
|
||||
with open(os.path.join(os.path.dirname(__file__), "requirements.txt"), "r") as f:
|
||||
reqs = f.readlines()
|
||||
|
||||
install_requirements = []
|
||||
for req in reqs:
|
||||
req = req.strip()
|
||||
if "==" in req:
|
||||
install_requirements.append(req)
|
||||
|
||||
setup(
|
||||
name = 'repo_cloner',
|
||||
|
@ -13,4 +21,5 @@ setup(
|
|||
'rc-prepare-git-tree=repo_cloner.prepare_git_tree:main',
|
||||
]
|
||||
},
|
||||
install_requires = install_requirements,
|
||||
)
|
||||
|
|
|
@ -433,7 +433,7 @@ def test_open_initialized(cloner_dir_with_config, path_repo_base, caplog):
|
|||
hashed = gen_repo_hashed_name(path_repo_base.as_uri())
|
||||
path = cloner_dir_with_config.joinpath("repos", hashed).as_posix()
|
||||
mock.config.cloner_repo_url = path_repo_base.as_uri()
|
||||
r = git.Repo().clone_from(path_repo_base.as_uri(), path, bare = True)
|
||||
r = git.Repo.clone_from(path_repo_base.as_uri(), path, bare = True)
|
||||
commit = r.head.commit.hexsha
|
||||
assert r.bare
|
||||
c = Cloner(mock)
|
||||
|
|
Loading…
Reference in New Issue
Block a user