casbin-async-django-orm-adapter 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- async_casbin_adapter/__init__.py +0 -0
- async_casbin_adapter/adapter.py +100 -0
- async_casbin_adapter/apps.py +24 -0
- async_casbin_adapter/enforcer.py +81 -0
- async_casbin_adapter/migrations/0001_initial.py +37 -0
- async_casbin_adapter/migrations/__init__.py +0 -0
- async_casbin_adapter/models.py +48 -0
- async_casbin_adapter/utils.py +25 -0
- casbin_async_django_orm_adapter-1.0.0.dist-info/METADATA +116 -0
- casbin_async_django_orm_adapter-1.0.0.dist-info/RECORD +74 -0
- casbin_async_django_orm_adapter-1.0.0.dist-info/WHEEL +5 -0
- casbin_async_django_orm_adapter-1.0.0.dist-info/licenses/LICENSE +201 -0
- casbin_async_django_orm_adapter-1.0.0.dist-info/top_level.txt +3 -0
- node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +45 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +365 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +206 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1272 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1547 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +59 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +152 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +270 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +574 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +704 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +709 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +173 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +169 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +113 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +55 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +805 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1172 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +1319 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +128 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +104 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +462 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +89 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +56 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2745 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3976 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +44 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2965 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +67 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1391 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +26 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +3112 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +99 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +767 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +1260 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +174 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +61 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +373 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1939 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +54 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +303 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +3196 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +65 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +108 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py +252 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +825 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py +553 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
- node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
- node_modules/npm/node_modules/node-gyp/gyp/test_gyp.py +261 -0
- node_modules/semantic-release-pypi/dist/py/set_version.py +32 -0
- node_modules/semantic-release-pypi/dist/py/verify_setup.py +24 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
|
3
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
5
|
+
# found in the LICENSE file.
|
6
|
+
|
7
|
+
""" Unit tests for the ninja.py file. """
|
8
|
+
|
9
|
+
import sys
|
10
|
+
import unittest
|
11
|
+
from pathlib import Path
|
12
|
+
|
13
|
+
from gyp.generator import ninja
|
14
|
+
|
15
|
+
|
16
|
+
class TestPrefixesAndSuffixes(unittest.TestCase):
|
17
|
+
def test_BinaryNamesWindows(self):
|
18
|
+
# These cannot run on non-Windows as they require a VS installation to
|
19
|
+
# correctly handle variable expansion.
|
20
|
+
if sys.platform.startswith("win"):
|
21
|
+
writer = ninja.NinjaWriter(
|
22
|
+
"foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "win"
|
23
|
+
)
|
24
|
+
spec = {"target_name": "wee"}
|
25
|
+
self.assertTrue(
|
26
|
+
writer.ComputeOutputFileName(spec, "executable").endswith(".exe")
|
27
|
+
)
|
28
|
+
self.assertTrue(
|
29
|
+
writer.ComputeOutputFileName(spec, "shared_library").endswith(".dll")
|
30
|
+
)
|
31
|
+
self.assertTrue(
|
32
|
+
writer.ComputeOutputFileName(spec, "static_library").endswith(".lib")
|
33
|
+
)
|
34
|
+
|
35
|
+
def test_BinaryNamesLinux(self):
|
36
|
+
writer = ninja.NinjaWriter(
|
37
|
+
"foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "linux"
|
38
|
+
)
|
39
|
+
spec = {"target_name": "wee"}
|
40
|
+
self.assertTrue("." not in writer.ComputeOutputFileName(spec, "executable"))
|
41
|
+
self.assertTrue(
|
42
|
+
writer.ComputeOutputFileName(spec, "shared_library").startswith("lib")
|
43
|
+
)
|
44
|
+
self.assertTrue(
|
45
|
+
writer.ComputeOutputFileName(spec, "static_library").startswith("lib")
|
46
|
+
)
|
47
|
+
self.assertTrue(
|
48
|
+
writer.ComputeOutputFileName(spec, "shared_library").endswith(".so")
|
49
|
+
)
|
50
|
+
self.assertTrue(
|
51
|
+
writer.ComputeOutputFileName(spec, "static_library").endswith(".a")
|
52
|
+
)
|
53
|
+
|
54
|
+
def test_GenerateCompileDBWithNinja(self):
|
55
|
+
build_dir = (
|
56
|
+
Path(__file__).resolve().parent.parent.parent.parent / "data" / "ninja"
|
57
|
+
)
|
58
|
+
compile_db = ninja.GenerateCompileDBWithNinja(build_dir)
|
59
|
+
assert len(compile_db) == 1
|
60
|
+
assert compile_db[0]["directory"] == str(build_dir)
|
61
|
+
assert compile_db[0]["command"] == "cc my.in my.out"
|
62
|
+
assert compile_db[0]["file"] == "my.in"
|
63
|
+
assert compile_db[0]["output"] == "my.out"
|
64
|
+
|
65
|
+
|
66
|
+
if __name__ == "__main__":
|
67
|
+
unittest.main()
|