Skip to content

Commit

Permalink
setup: Fix stylistic inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Apr 24, 2024
1 parent fdcbf66 commit 5ae6429
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import glob
import os
from pathlib import Path
import sys
from pathlib import Path
from typing import Iterator

from setuptools import setup


SOURCE_ROOT = Path(__file__).resolve().parent


Expand Down Expand Up @@ -80,14 +79,16 @@ def detect_version() -> str:
pkg_info = SOURCE_ROOT / "PKG-INFO"
in_source_package = pkg_info.exists()
if in_source_package:
version_line = [line for line in pkg_info.read_text(encoding="utf-8").split("\n")
if line.startswith("Version: ")][0].strip()
version_line = [
line for line in pkg_info.read_text(encoding="utf-8").split("\n") if line.startswith("Version: ")
][0].strip()
version = version_line[9:]
else:
releng_location = next(enumerate_releng_locations(), None)
if releng_location is not None:
sys.path.insert(0, str(releng_location.parent))
from releng.frida_version import detect

version = detect(SOURCE_ROOT).name.replace("-dev.", ".dev")
else:
version = "0.0.0"
Expand Down

0 comments on commit 5ae6429

Please sign in to comment.