Files
macports-ports/textproc/q-textasdata/files/patch-fix-broken-packaging.diff
Renee Otten 2320e27448 q-textasdata: update to 3.1.7, use Python 3.14
- fix packaging issues, did not work correctly before either
2026-02-19 14:40:49 -05:00

56 lines
1.7 KiB
Diff

See upstream:
* Issue: https://github.com/harelba/q/pull/326
* PR: https://github.com/harelba/q/pull/327
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'
]
}
)
--- 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')