Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

changed: switch to poetry #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ncaq
Copy link

@ncaq ncaq commented Jun 2, 2021

I write to switch system to poetry.

Because,
poetry add "git+https://github.com/jvkersch/hsmmlearn" is failed.
poetry don't load system Cython.

Poetry doesn`t use provided private repo when compiling dependencies from source · Issue #3744 · python-poetry/poetry

2021-06-02T18:46:48 ✖ poetry add "git+https://github.com/jvkersch/hsmmlearn"

  PackageInfoError

  Unable to determine package info for path: /tmp/pypoetry-git-hsmmlearn0klkxnrl

  Fallback egg_info generation failed.

  Command ['/tmp/tmpqwo321rq/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1, and output:
  Traceback (most recent call last):
    File "/tmp/pypoetry-git-hsmmlearn0klkxnrl/setup.py", line 54, in <module>
      ext_modules=get_extension_modules(),
    File "/tmp/pypoetry-git-hsmmlearn0klkxnrl/setup.py", line 23, in get_extension_modules
      from Cython.Build import cythonize
  ModuleNotFoundError: No module named 'Cython'

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/inspection/info.py:502 in _pep517_metadata
      498│                 try:
      499│                     venv.run("python", "setup.py", "egg_info")
      500│                     return cls.from_metadata(path)
      501│                 except EnvCommandError as fbe:
    → 502│                     raise PackageInfoError(
      503│                         path, "Fallback egg_info generation failed.", fbe
      504│                     )
      505│                 finally:
      506│                     os.chdir(cwd.as_posix())

Even if you were to upload it to PyPi.
Basically, it is better to keep the information needed for the build closed locally.
It is easier to keep the information needed to build locally, even if it is uploaded to PyPi, so I let poetry do the work and made the global library as unnecessary as possible.

This is a near draft, it still has data from the previous build system, and it doesn't properly accept information from the previous build system.
If this project is still alive and accepting PRs, I will work on it more carefully.

I write to switch system to poetry.

Because,
`poetry add "git+https://github.com/jvkersch/hsmmlearn"` is failed.
poetry don't load system Cython.

[Poetry doesn`t use provided private repo when compiling dependencies from source · Issue #3744 · python-poetry/poetry](python-poetry/poetry#3744)

~~~console
2021-06-02T18:46:48 ✖ poetry add "git+https://github.com/jvkersch/hsmmlearn"

  PackageInfoError

  Unable to determine package info for path: /tmp/pypoetry-git-hsmmlearn0klkxnrl

  Fallback egg_info generation failed.

  Command ['/tmp/tmpqwo321rq/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1, and output:
  Traceback (most recent call last):
    File "/tmp/pypoetry-git-hsmmlearn0klkxnrl/setup.py", line 54, in <module>
      ext_modules=get_extension_modules(),
    File "/tmp/pypoetry-git-hsmmlearn0klkxnrl/setup.py", line 23, in get_extension_modules
      from Cython.Build import cythonize
  ModuleNotFoundError: No module named 'Cython'

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/inspection/info.py:502 in _pep517_metadata
      498│                 try:
      499│                     venv.run("python", "setup.py", "egg_info")
      500│                     return cls.from_metadata(path)
      501│                 except EnvCommandError as fbe:
    → 502│                     raise PackageInfoError(
      503│                         path, "Fallback egg_info generation failed.", fbe
      504│                     )
      505│                 finally:
      506│                     os.chdir(cwd.as_posix())
~~~

Even if you were to upload it to PyPi.
Basically, it is better to keep the information needed for the build closed locally.
It is easier to keep the information needed to build locally, even if it is uploaded to PyPi, so I let poetry do the work and made the global library as unnecessary as possible.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant