harelba / q

q - Run SQL directly on delimited files and multi-file sqlite databases
http://harelba.github.io/q/
GNU General Public License v3.0
10.19k stars 421 forks source link

local install fails due to setup.py #301

Open InCogNiTo124 opened 2 years ago

InCogNiTo124 commented 2 years ago

Steps to reproduce:

1. git clone git@github.com:harelba/q.git
2. cd q/
3. pip install -e .
4. cd ~
5. q
Traceback...
...
... No module named 'bin'

The solution is line setup.py:L28:

'q = bin.q:run_standalone' -> 'q = q:run_standalone'

harelba commented 2 years ago

Hi, there's some kind of misalignment there with relation to the fact of whether bin is a folder or a package.

I haven't solved it completely in the last release, as I was focusing on making the q standalone executable using pyoxidizer.

Can you describe the reasons you need it? Is it for actually using q on a machine, or is it for development purposes?

Harel

InCogNiTo124 commented 2 years ago

I was just trying alternative running options. The official ubuntu release seemed a bit outdated and I was reluctant to build my own dpkg from master so I tried cloning the repo and installing it locally. I don't need need it, but I stil felt I should report this

msmetko

raylu commented 1 year ago

FWIW, just changing console_scripts to q = q:run_standalone isn't great. it works after installing, but then

$ pip3 uninstall q
Found existing installation: q 3.1.6
Uninstalling q-3.1.6:
  Would remove:
    /Users/raylu/venv/bin/q
    /Users/raylu/venv/lib/python3.9/site-packages/*
  Would not remove (might be manually added):
    /Users/raylu/venv/lib/python3.9/site-packages/_distutils_hack/__init__.py
    /Users/raylu/venv/lib/python3.9/site-packages/_distutils_hack/override.py

[a looong list of every single file in site-packages]

    /Users/raylu/venv/lib/python3.9/site-packages/zipp/glob.py
    /Users/raylu/venv/lib/python3.9/site-packages/zipp/py310compat.py
Proceed (Y/n)?

adding py_modules=['q'] is one way to fix uninstallation