diff --git a/setup.py b/setup.py index 6d0fac7e..2634e130 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,5 @@ #!/usr/bin/env python - -from setuptools import setup -import setuptools +from setuptools import setup, find_packages q_version = '3.1.6' @@ -18,14 +16,14 @@ long_description=long_description, long_description_content_type="text/markdown", author_email='harelba@gmail.com', - install_requires=[ - 'six==1.11.0' - ], - package_dir={"": "bin"}, - packages=setuptools.find_packages(where="bin"), + install_requires=['six'], + python_requires="<3.11", + tests_require=['pytest'], + packages=find_packages("src"), + package_dir={"": "src"}, entry_points={ 'console_scripts': [ - 'q = bin.q:run_standalone' + 'q = q.q:run_standalone' ] } ) diff --git a/bin/.qrc b/src/q/.qrc similarity index 100% rename from bin/.qrc rename to src/q/.qrc diff --git a/bin/__init__.py b/src/q/__init__.py similarity index 100% rename from bin/__init__.py rename to src/q/__init__.py diff --git a/bin/q.bat b/src/q/q.bat similarity index 100% rename from bin/q.bat rename to src/q/q.bat diff --git a/bin/q.py b/src/q/q.py similarity index 100% rename from bin/q.py rename to src/q/q.py diff --git a/test/BENCHMARK.md b/tests/BENCHMARK.md similarity index 100% rename from test/BENCHMARK.md rename to tests/BENCHMARK.md diff --git a/test/__init__.py b/tests/__init__.py similarity index 100% rename from test/__init__.py rename to tests/__init__.py diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/octosql_v0.3.0.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/octosql_v0.3.0.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/octosql_v0.3.0.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/octosql_v0.3.0.benchmark-results diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-2.7.18.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-2.7.18.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-2.7.18.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-2.7.18.benchmark-results diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.6.4.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.6.4.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.6.4.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.6.4.benchmark-results diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.7.9.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.7.9.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.7.9.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.7.9.benchmark-results diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.8.5.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.8.5.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.8.5.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/q-benchmark-3.8.5.benchmark-results diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/summary.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/summary.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/summary.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/summary.benchmark-results diff --git a/test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/textql_2.0.3.benchmark-results b/tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/textql_2.0.3.benchmark-results similarity index 100% rename from test/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/textql_2.0.3.benchmark-results rename to tests/benchmark-results/source-files-1443b7418b46594ad256abd9db4a7671cb251e6a/2020-09-17-v2.0.17/textql_2.0.3.benchmark-results diff --git a/examples/EXAMPLES.markdown b/tests/data/EXAMPLES.markdown similarity index 100% rename from examples/EXAMPLES.markdown rename to tests/data/EXAMPLES.markdown diff --git a/examples/exampledatafile b/tests/data/exampledatafile similarity index 100% rename from examples/exampledatafile rename to tests/data/exampledatafile diff --git a/examples/group-emails-example b/tests/data/group-emails-example similarity index 100% rename from examples/group-emails-example rename to tests/data/group-emails-example diff --git a/test/test_suite.py b/tests/test_suite.py similarity index 99% rename from test/test_suite.py rename to tests/test_suite.py index aaa7476f..c929edaa 100755 --- a/test/test_suite.py +++ b/tests/test_suite.py @@ -41,13 +41,13 @@ import collections sys.path.append(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),'..','bin')) -from bin.q import QTextAsData, QOutput, QOutputPrinter, QInputParams, DataStream, Sqlite3DB +from q.q import QTextAsData, QOutput, QOutputPrinter, QInputParams, DataStream, Sqlite3DB # q uses this encoding as the default output encoding. Some of the tests use it in order to # make sure that the output is correctly encoded SYSTEM_ENCODING = locale.getpreferredencoding() -EXAMPLES = os.path.abspath(os.path.join(os.getcwd(), 'examples')) +EXAMPLES = os.path.join(os.path.dirname(__file__), 'data') Q_EXECUTABLE = os.getenv('Q_EXECUTABLE', os.path.abspath('./bin/q.py')) Q_SKIP_EXECUTABLE_VALIDATION = os.getenv('Q_SKIP_EXECUTABLE_VALIDATION','false')