intake / pandas-decimal

decimal extension for pandas
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Make installable by `pip install git+` #2

Closed hoxbro closed 1 year ago

hoxbro commented 1 year ago

I wanted to try out the module with: python -m pip install git+https://github.com/martindurant/pandas-decimal, but got the following error. This is fixed by adding [tool.setuptools.packages.find] to pyproject.toml.

Also, I changed flake8 to the github repo and ran pre-commit run --all-files.

❯ python -m pip install git+https://github.com/martindurant/pandas-decimal
Collecting git+https://github.com/martindurant/pandas-decimal
  Cloning https://github.com/martindurant/pandas-decimal to /tmp/pip-req-build-79x1j4gq
  Running command git clone --filter=blob:none --quiet https://github.com/martindurant/pandas-decimal /tmp/pip-req-build-79x1j4gq
  Resolved https://github.com/martindurant/pandas-decimal to commit 8b1bcd8957f9a80441b373b957505be32cb464c8
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /tmp/pip-build-env-lzwhwyiv/overlay/lib/python3.10/site-packages/setuptools/config/expand.py:144: UserWarning: File '/tmp/pip-req-build-79x1j4gq/LICENCE' cannot be found
        warnings.warn(f"File {path!r} cannot be found")
      error: Multiple top-level packages discovered in a flat-layout: ['notebooks', 'pandas_decimal'].

      To avoid accidental inclusion of unwanted files or directories,
      setuptools will not proceed with this build.

      If you are trying to create a single distribution with multiple packages
      on purpose, you should not rely on automatic discovery.
      Instead, consider the following options:

      1. set up custom discovery (`find` directive with `include` or `exclude`)
      2. use a `src-layout`
      3. explicitly set `py_modules` or `packages` with a list of names

      To find more information, look for "package discovery" on setuptools docs.
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
hoxbro commented 1 year ago

Found some small bugs, which I also added to this PR. I can also split it into new PRs if you want me to do that.