ErlangDistMoneroClient / _DistConn had WALLET_SERVICE_NAME = "Elixir.Wallet.Service" hardcoded as the REG_SEND target, ignoring the registered_name read from production.ini's [app:main] wallet_dist.registered_name. Smoke-test against production portal failed for hours with 'peer closed after 0/4 bytes' — the bytes WERE arriving at portal, dist handshake succeeded, but portal had no process registered as :'Elixir.Wallet.Service' (the actual registered name is :'Elixir.Wallet.Bridge', because the bridge GenServer forwards from MPS to wallet@cammy.foxhop.net). REG_SEND to an unregistered name is silently dropped by the dist driver — exactly the symptom we saw. Confirmed by direct Python call to :'Elixir.Wallet.Bridge' from the same MPS host succeeding while the CLI failed; only difference was the hardcoded target name. WalletDistConfig.client_kwargs() now includes registered_name. _DistConn / ErlangDistMoneroClient / open_wallet_conn accept it as an optional kwarg (defaults to legacy WALLET_SERVICE_NAME for backwards-compat with callers that don't pass it). This was NOT a TLS 1.3 bug — earlier debugging hypothesized that but was misled by the symptom. Locking TLS 1.2 max made the direct test work because the direct test was already calling the right name.
94 lines
3.3 KiB
Python
94 lines
3.3 KiB
Python
import os
|
|
import subprocess
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
def parse_requirements(filename):
|
|
"""
|
|
Read and parse a requirements file, ignoring comments and blank lines.
|
|
"""
|
|
req_path = os.path.join(os.path.dirname(__file__), filename)
|
|
with open(req_path, "r", encoding="utf-8") as f:
|
|
lines = f.read().splitlines()
|
|
return [line.strip() for line in lines if line.strip() and not line.startswith("#")]
|
|
|
|
|
|
# Determine the runtime requirements.
|
|
install_requires = parse_requirements("requirements.py3.txt")
|
|
|
|
# Optional extras for development, production, and testing.
|
|
extras_require = {
|
|
"dev": parse_requirements("requirements-dev.txt"),
|
|
"prod": parse_requirements("requirements-prod.txt"),
|
|
"test": parse_requirements("requirements-test.txt"),
|
|
}
|
|
|
|
# Read the long description from README.rst.
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
with open(os.path.join(here, "README.rst"), "r", encoding="utf-8") as f:
|
|
long_description = f.read()
|
|
|
|
# Bake git hash into package so /version works without .git directory.
|
|
git_hash_file = os.path.join(here, "make_post_sell", "GIT_HASH")
|
|
try:
|
|
git_hash = (
|
|
subprocess.check_output(
|
|
["git", "rev-parse", "--short", "HEAD"],
|
|
cwd=here,
|
|
stderr=subprocess.DEVNULL,
|
|
)
|
|
.decode()
|
|
.strip()
|
|
)
|
|
with open(git_hash_file, "w") as f:
|
|
f.write(git_hash)
|
|
except Exception:
|
|
pass
|
|
|
|
setup(
|
|
name="make_post_sell",
|
|
version="1.2.1",
|
|
description="Make Post Sell",
|
|
long_description=long_description,
|
|
classifiers=[
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.6",
|
|
"Programming Language :: Python :: 3.7",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.14",
|
|
"Programming Language :: Python :: 3.15",
|
|
"Programming Language :: Python",
|
|
"Framework :: Pyramid",
|
|
"Topic :: Internet :: WWW/HTTP",
|
|
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
|
|
],
|
|
author="Russell Ballestrini",
|
|
author_email="russell@ballestrini.net",
|
|
url="https://www.makepostsell.com",
|
|
keywords="make post sell web pyramid pylons ecommerce digital downloads physical goods content marketing youtube alternative",
|
|
packages=find_packages(exclude=["tests"]),
|
|
package_data={
|
|
"make_post_sell": ["scripts/alembic/*.py", "scripts/alembic/versions/*.py", "GIT_HASH", "lib/voxsplit.c"]
|
|
},
|
|
include_package_data=True,
|
|
zip_safe=False,
|
|
install_requires=install_requires,
|
|
extras_require=extras_require,
|
|
entry_points={
|
|
"paste.app_factory": ["main = make_post_sell:main"],
|
|
"console_scripts": [
|
|
"initialize_make_post_sell_db = make_post_sell.scripts.initialize_db:main",
|
|
"crypto_watcher = make_post_sell.lib.crypto_watcher:main",
|
|
"digest_sender = make_post_sell.lib.digest_sender:main",
|
|
"mps_wallet_dist_health = make_post_sell.lib.crypto_watcher.wallet_dist_health:main",
|
|
],
|
|
},
|
|
)
|
|
|
|
# python setup.py sdist bdist_wheel
|
|
# twine upload dist/*
|