All change yet again: We're now building and installing a wheel, not an egg

# Conflicts:
#	src/eddn/schemas/fssbodysignals-README.md
#	src/eddn/schemas/fssbodysignals-v1.0.json
#	src/eddn/schemas/fsssignaldiscovered-README.md
#	src/eddn/schemas/fsssignaldiscovered-v1.0.json
This commit is contained in:
Athanasius 2022-08-18 14:56:47 +01:00
parent ef2c184710
commit 0f04fd61a5
No known key found for this signature in database
GPG Key ID: 8C392035DD80FD62
33 changed files with 9 additions and 5 deletions

View File

@ -80,13 +80,17 @@ setup(
author="EDCD (https://edcd.github.io/)", author="EDCD (https://edcd.github.io/)",
author_email="edcd@miggy.org", author_email="edcd@miggy.org",
url="https://github.com/EDCD/EDDN", url="https://github.com/EDCD/EDDN",
packages=find_packages("src"),
package_dir={"": "src"},
# <https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#py-modules> # <https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#py-modules>
py_modules=["Gateway", "Monitor", "Relay", "Bouncer"], py_modules=["Gateway", "Monitor", "Relay", "Bouncer"],
packages=find_packages("src"),
package_dir={"": "src"},
# Should mean it picks up src/eddn/schemas/ files
include_package_data=True,
# This includes them for the running code, but that doesn't help # This includes them for the running code, but that doesn't help
# serve them up for reference. # serve them up for reference.
data_files=[("schemas", glob.glob("src/schemas/*.json"))], # data_files=[("schemas": glob.glob("src/schemas/*.json"))],
install_requires=[ install_requires=[
"argparse", "argparse",
"bottle", "bottle",
@ -220,7 +224,7 @@ except OSError:
pass pass
shutil.copytree( shutil.copytree(
"src/schemas", "src/eddn/schemas",
SHARE_EDDN_FILES / "schemas", SHARE_EDDN_FILES / "schemas",
copy_function=shutil.copyfile, # type: ignore copy_function=shutil.copyfile, # type: ignore
) )

View File

@ -118,7 +118,7 @@ def configure() -> None:
sender.bind(binding) sender.bind(binding)
for schema_ref, schema_file in Settings.GATEWAY_JSON_SCHEMAS.items(): for schema_ref, schema_file in Settings.GATEWAY_JSON_SCHEMAS.items():
validator.add_schema_resource(schema_ref, resource_string("Gateway", schema_file)) validator.add_schema_resource(schema_ref, resource_string("eddn", schema_file))
def push_message(parsed_message: Dict, topic: str) -> None: def push_message(parsed_message: Dict, topic: str) -> None: