diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-05-27 16:37:54 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-05-27 18:01:27 +0100 |
commit | 7b6ad051c49818b69b32a8a5db834001d5626bfe (patch) | |
tree | 05c51284bf987a37a22af42df3333a507f59c348 /setup.py | |
parent | 65fdba5882b7de25d95875cea9dfc13e309bd152 (diff) | |
download | cheatdb-7b6ad051c49818b69b32a8a5db834001d5626bfe.tar.xz |
Remove dependencies, add meta packages
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -255,7 +255,6 @@ No warranty is provided, express or implied, for any part of the project. mod.title = "Sweet Foods" mod.license = licenses["CC0"] mod.type = PackageType.MOD - mod.harddeps.append(food) mod.author = ruben mod.tags.append(tags["player_effects"]) mod.repo = "https://github.com/rubenwardy/food_sweet/" @@ -314,6 +313,19 @@ Uses the CTF PvP Engine. rel.approved = True db.session.add(rel) + db.session.commit() + + metas = {} + for package in Package.query.filter_by(type=PackageType.MOD).all(): + meta = None + try: + meta = metas[package.name] + except KeyError: + meta = MetaPackage(package.name) + db.session.add(meta) + metas[package.name] = meta + package.provides.append(meta) + delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d" if delete_db and os.path.isfile("db.sqlite"): |