Skip to content

Commit

Permalink
Remove dev build requirements, that cause problems in windows (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgriffin authored Oct 27, 2024
1 parent 48dd10f commit 9cf1792
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
18 changes: 4 additions & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ bitcoin-qr-tools = "^0.14.8"
bitcoin-nostr-chat = "^0.4.1"
bitcoin-usb = "^0.5.3"
numpy = "^2.0.1"
importlib = "^1.0.4"
pgpy = "^0.6.0"


Expand All @@ -67,7 +66,7 @@ test_sources = [ "tests",]
test_requires = [ "pytest",]
resources = [ "bitcoin_safe/gui/locales/*.qm",]
# these requirements are updated from the poetry lock file automatically
requires = ["appdirs==1.4.4", "arrow==1.3.0", "asn1crypto==1.5.1", "base58==2.1.1", "bdkpython==0.31.0", "binaryornot==0.4.4", "bitcoin-nostr-chat==0.4.1", "bitcoin-qr-tools==0.14.8", "bitcoin-usb==0.5.3", "briefcase==0.3.19", "build==1.2.2.post1", "cachecontrol==0.14.0", "cbor2==5.6.5", "certifi==2024.8.30", "cffi==1.17.1", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "cleo==2.1.0", "click==8.1.7", "colorama==0.4.6", "cookiecutter==2.6.0", "crashtest==0.4.1", "cryptography==43.0.3", "defusedxml==0.7.1", "distlib==0.3.9", "dmgbuild==1.6.2", "ds-store==1.3.1", "dulwich==0.21.7", "ecdsa==0.19.0", "electrumsv-secp256k1==18.0.0", "exceptiongroup==1.2.2", "fastjsonschema==2.20.0", "filelock==3.16.1", "fonttools==4.54.1", "fpdf2==2.8.1", "gitdb==4.0.11", "gitpython==3.1.43", "hidapi==0.14.0.post2", "hwi==3.1.0", "identify==2.6.1", "idna==3.10", "importlib==1.0.4", "importlib-metadata==8.5.0", "iniconfig==2.0.0", "installer==0.7.0", "jaraco-classes==3.4.0", "jeepney==0.8.0", "jinja2==3.1.4", "keyring==24.3.1", "libusb1==3.1.0", "lxml==5.3.0", "mac-alias==2.2.2", "markdown-it-py==3.0.0", "markupsafe==3.0.2", "mdurl==0.1.2", "mnemonic==0.21", "more-itertools==10.5.0", "msgpack==1.1.0", "mss==9.0.2", "nodeenv==1.9.1", "noiseprotocol==0.3.1", "nostr-sdk==0.32.2", "numpy==2.1.2", "opencv-python-headless==4.10.0.84", "packaging==24.1", "pexpect==4.9.0", "pgpy==0.6.0", "pillow==10.4.0", "pip==24.2", "pkginfo==1.11.2", "platformdirs==4.3.6", "pluggy==1.5.0", "poetry==1.8.4", "poetry-core==1.9.1", "poetry-plugin-export==1.8.0", "pre-commit==3.8.0", "protobuf==4.25.5", "psutil==5.9.8", "ptyprocess==0.7.0", "pyaes==1.6.1", "pyasn1==0.6.1", "pycparser==2.22", "pygame==2.6.1", "pygments==2.18.0", "pyprof2calltree==1.4.5", "pyproject-hooks==1.2.0", "pyqrcode==1.2.1", "pyqt6==6.7.1", "pyqt6-charts==6.7.0", "pyqt6-charts-qt6==6.7.3", "pyqt6-qt6==6.7.3", "pyqt6-sip==13.8.0", "pyserial==3.5", "pytest==8.3.3", "pytest-qt==4.4.0", "pytest-xvfb==3.0.0", "python-bitcointx==1.1.4", "python-dateutil==2.9.0.post0", "python-gnupg==0.5.3", "python-slugify==8.0.4", "pyvirtualdisplay==3.0", "pywin32-ctypes==0.2.3", "pyyaml==6.0.2", "pyzbar==0.1.9", "rapidfuzz==3.10.1", "reportlab==4.0.8", "requests==2.32.3", "requests-toolbelt==1.0.0", "rich==13.9.3", "secretstorage==3.3.3", "segno==1.6.1", "semver==3.0.2", "setuptools==75.2.0", "shellingham==1.5.4", "six==1.16.0", "smmap==5.0.1", "snakeviz==2.2.0", "text-unidecode==1.3", "tomli==2.0.2", "tomli-w==1.1.0", "tomlkit==0.13.2", "tornado==6.4.1", "translate-toolkit==3.14.1", "trove-classifiers==2024.10.21.16", "types-python-dateutil==2.9.0.20241003", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wcwidth==0.2.13", "wheel==0.44.0", "xattr==1.1.0", "zipp==3.20.2"]
requires = ["appdirs==1.4.4", "arrow==1.3.0", "asn1crypto==1.5.1", "base58==2.1.1", "bdkpython==0.31.0", "binaryornot==0.4.4", "bitcoin-nostr-chat==0.4.1", "bitcoin-qr-tools==0.14.8", "bitcoin-usb==0.5.3", "briefcase==0.3.19", "build==1.2.2.post1", "cachecontrol==0.14.0", "cbor2==5.6.5", "certifi==2024.8.30", "cffi==1.17.1", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "cleo==2.1.0", "click==8.1.7", "colorama==0.4.6", "cookiecutter==2.6.0", "crashtest==0.4.1", "cryptography==43.0.3", "defusedxml==0.7.1", "distlib==0.3.9", "dmgbuild==1.6.2", "ds-store==1.3.1", "dulwich==0.21.7", "ecdsa==0.19.0", "electrumsv-secp256k1==18.0.0", "exceptiongroup==1.2.2", "fastjsonschema==2.20.0", "filelock==3.16.1", "fonttools==4.54.1", "fpdf2==2.8.1", "gitdb==4.0.11", "gitpython==3.1.43", "hidapi==0.14.0.post2", "hwi==3.1.0", "identify==2.6.1", "idna==3.10", "importlib-metadata==8.5.0", "iniconfig==2.0.0", "installer==0.7.0", "jaraco-classes==3.4.0", "jeepney==0.8.0", "jinja2==3.1.4", "keyring==24.3.1", "libusb1==3.1.0", "lxml==5.3.0", "mac-alias==2.2.2", "markdown-it-py==3.0.0", "markupsafe==3.0.2", "mdurl==0.1.2", "mnemonic==0.21", "more-itertools==10.5.0", "msgpack==1.1.0", "mss==9.0.2", "nodeenv==1.9.1", "noiseprotocol==0.3.1", "nostr-sdk==0.32.2", "numpy==2.1.2", "opencv-python-headless==4.10.0.84", "packaging==24.1", "pexpect==4.9.0", "pgpy==0.6.0", "pillow==10.4.0", "pip==24.3", "pkginfo==1.11.2", "platformdirs==4.3.6", "pluggy==1.5.0", "poetry-core==1.9.1", "poetry-plugin-export==1.8.0", "pre-commit==3.8.0", "protobuf==4.25.5", "psutil==5.9.8", "ptyprocess==0.7.0", "pyaes==1.6.1", "pyasn1==0.6.1", "pycparser==2.22", "pygame==2.6.1", "pygments==2.18.0", "pyprof2calltree==1.4.5", "pyproject-hooks==1.2.0", "pyqrcode==1.2.1", "pyqt6==6.7.1", "pyqt6-charts==6.7.0", "pyqt6-charts-qt6==6.7.3", "pyqt6-qt6==6.7.3", "pyqt6-sip==13.8.0", "pyserial==3.5", "pytest==8.3.3", "pytest-qt==4.4.0", "pytest-xvfb==3.0.0", "python-bitcointx==1.1.4", "python-dateutil==2.9.0.post0", "python-gnupg==0.5.3", "python-slugify==8.0.4", "pyvirtualdisplay==3.0", "pywin32-ctypes==0.2.3", "pyyaml==6.0.2", "pyzbar==0.1.9", "rapidfuzz==3.10.1", "reportlab==4.0.8", "requests==2.32.3", "requests-toolbelt==1.0.0", "rich==13.9.3", "secretstorage==3.3.3", "segno==1.6.1", "semver==3.0.2", "setuptools==75.2.0", "shellingham==1.5.4", "six==1.16.0", "smmap==5.0.1", "snakeviz==2.2.0", "text-unidecode==1.3", "tomli==2.0.2", "tomli-w==1.1.0", "tomlkit==0.13.2", "tornado==6.4.1", "translate-toolkit==3.14.1", "trove-classifiers==2024.10.21.16", "types-python-dateutil==2.9.0.20241003", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wcwidth==0.2.13", "wheel==0.44.0", "zipp==3.20.2"]



Expand Down
7 changes: 7 additions & 0 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
SignatureSigner,
SignatureVerifyer,
)
from tools.release import get_git_tag

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
Expand All @@ -56,6 +57,10 @@ class Builder:
def __init__(self, module_name, clean_all=False):
self.module_name = module_name
self.version = __version__ if __version__ else "unknown-version"
if __version__ != get_git_tag():
# i still proceed with this, since I need to test the builds,
# before the git tag is set
logger.error(f"__version__ {__version__} != git tag {get_git_tag()}")

self.app_name = (
f"{self.app_name_formatter(module_name)}_{self.version}" if self.version else "unknown-version"
Expand Down Expand Up @@ -97,6 +102,8 @@ def update_briefcase_requires(
# Extract packages from the lock file
for package in poetry_lock_data["package"]:
name = package["name"]
if name in ["xattr", "poetry"]:
continue
version = package["version"]
if package.get("source"):
briefcase_requires.append(package.get("source", {}).get("url"))
Expand Down
23 changes: 10 additions & 13 deletions tools/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,9 @@ def run_pytest() -> None:
sys.exit("Stopping script due to failed tests.")


def get_latest_git_tag() -> Optional[str]:
"""Fetch the latest tag from the local git repository."""
try:
latest_tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"]).decode().strip()
return latest_tag
except subprocess.CalledProcessError as e:
print("Failed to fetch latest Git tag:", e)
return None
def get_git_tag() -> str:
"""Fetch the tag from the git repository."""
return subprocess.check_output(["git", "describe", "--tags", "--dirty", "--always"]).decode().strip()


def get_checkout_main():
Expand Down Expand Up @@ -255,10 +250,10 @@ def main() -> None:

from bitcoin_safe import __version__

latest_tag: Optional[str] = get_latest_git_tag()
if latest_tag == __version__ and (
git_tag: Optional[str] = get_git_tag()
if git_tag == __version__ and (
get_input_with_default(
f"The tag {latest_tag} exists already. Do you want to continue? (y/n): ", "n"
f"The tag {git_tag} exists already. Do you want to continue? (y/n): ", "n"
).lower()
!= "y"
):
Expand All @@ -267,8 +262,10 @@ def main() -> None:
if get_input_with_default(f"Is this version {__version__} correct? (y/n): ", "y").lower() != "y":
return

if latest_tag != __version__:
add_and_publish_git_tag(__version__)
if git_tag != __version__:
print(f"Error: Git tag {git_tag} != {__version__}")
return
# add_and_publish_git_tag(__version__)

directory = Path("dist")
files = list_directory_files(directory)
Expand Down

0 comments on commit 9cf1792

Please sign in to comment.