siddhantgoel / beancount-dkb

Beancount Importers for DKB (Deutsche Kredit Bank) CSV Exports
MIT License
36 stars 13 forks source link

Missig build dependency for setuptools #153

Closed e11bits closed 7 months ago

e11bits commented 7 months ago

The dependency for setuptools is missing and so a local install fails:

$ pip install -e /some_local_path/beancount-dkb/
Obtaining file:///some_local_path/beancount-dkb
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Installing collected packages: beancount-dkb
  Running setup.py develop for beancount-dkb
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [1 lines of output]
        ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
    ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
rc: 1
siddhantgoel commented 7 months ago

Is there a specific reason you're using pip directly? I have installed the project using poetry and it works just fine. For instance if I modify a test to fail locally and run the test suite again, I can see the tests fail. And the tests import the package using from beancount_dkb import ....

The Can not execute setup.py since setuptools is not available in the build environment message also makes me somewhat uneasy. The PyPA documentation on setuptools suggests that we shouldn't do this.

e11bits commented 7 months ago

I'm doing this to install a version I'm currently working on. So I can test it on real CSV, but maybe there is a poetry way to do that? I'm not that familiar with it.

siddhantgoel commented 7 months ago

poetry add --editable /path/to/beancount-dkb should work, I think.