Initial re-arrangement of files

* Move the service scripts out of src/eddn/ into src/
* Move the schemas/ to src/schemas/
* Some updates to setup.py, i.e. source of files, but the setuptools
  part isn't yet work.

# Conflicts:
#	src/schemas/fssbodysignals-README.md
#	src/schemas/fssbodysignals-v1.0.json
#	src/schemas/fsssignaldiscovered-README.md
#	src/schemas/fsssignaldiscovered-v1.0.json
This commit is contained in:
Athanasius 2022-08-18 14:55:18 +01:00
parent ede9abb95e
commit d36e45873d
No known key found for this signature in database
GPG Key ID: 8C392035DD80FD62
35 changed files with 7 additions and 7 deletions

View File

@ -84,7 +84,7 @@ setup(
package_dir={"": "src"}, package_dir={"": "src"},
# 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=[("eddn/schemas", glob.glob("schemas/*.json"))], data_files=[("eddn/src/schemas", glob.glob("src/schemas/*.json"))],
# Yes, we pin versions. With python2.7 the latest pyzmq will NOT # Yes, we pin versions. With python2.7 the latest pyzmq will NOT
# work, for instance. # work, for instance.
install_requires=[ install_requires=[
@ -99,10 +99,10 @@ setup(
], ],
entry_points={ entry_points={
"console_scripts": [ "console_scripts": [
"eddn-gateway = eddn.Gateway:main", "eddn-gateway = Gateway:main",
"eddn-relay = eddn.Relay:main", "eddn-relay = Relay:main",
"eddn-monitor = eddn.Monitor:main", "eddn-monitor = Monitor:main",
"eddn-bouncer = eddn.Bouncer:main", "eddn-bouncer = Bouncer:main",
], ],
}, },
) )
@ -220,7 +220,7 @@ except OSError:
pass pass
shutil.copytree( shutil.copytree(
"schemas", "src/schemas",
SHARE_EDDN_FILES / "schemas", SHARE_EDDN_FILES / "schemas",
copy_function=shutil.copyfile, # type: ignore copy_function=shutil.copyfile, # type: ignore
) )

View File

@ -127,7 +127,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("eddn.Gateway", schema_file)) validator.add_schema_resource(schema_ref, resource_string("Gateway", schema_file))
def push_message(parsed_message: Dict, topic: str) -> None: def push_message(parsed_message: Dict, topic: str) -> None: