semiotic-ai / autoagora

Apache License 2.0
11 stars 5 forks source link

issue: build: unable to detect version control system #77

Open cryptovestor21 opened 1 year ago

cryptovestor21 commented 1 year ago

Hi, having issues building 1.4.0

Building ag
Sending build context to Docker daemon  871.4kB
Step 1/12 : FROM python:3.8 as build
 ---> acbad168a4e7
Step 2/12 : ENV PYTHONUNBUFFERED=1
 ---> Using cache
 ---> 40ab224e6a8e
Step 3/12 : WORKDIR /root
 ---> Using cache
 ---> 9ec6f5204390
Step 4/12 : COPY . src/
 ---> 7849d51bb149
Step 5/12 : RUN pip install --upgrade pip &&     pip wheel --no-deps --wheel-dir dist ./src
 ---> Running in ab504348c63a
Requirement already satisfied: pip in /usr/local/lib/python3.8/site-packages (22.0.4)
Collecting pip
  Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 17.8 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
Successfully installed pip-23.1.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Processing ./src
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 41, in prepare_metadata_for_build_wheel
          poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/poetry_dynamic_versioning/patch.py", line 23, in alt_poetry_create
          name = _get_and_apply_version(
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/poetry_dynamic_versioning/__init__.py", line 359, in _get_and_apply_version
          version = _get_version(config)
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/poetry_dynamic_versioning/__init__.py", line 212, in _get_version
          version = Version.from_vcs(
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/dunamai/__init__.py", line 1793, in from_vcs
          return cls._do_vcs_callback(
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/dunamai/__init__.py", line 1827, in _do_vcs_callback
          return callback(**kwargs)
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/dunamai/__init__.py", line 1756, in from_any_vcs
          vcs = _detect_vcs()
        File "/tmp/pip-build-env-tygieps2/overlay/lib/python3.8/site-packages/dunamai/__init__.py", line 337, in _detect_vcs
          raise RuntimeError(" ".join(error_parts))
      RuntimeError: Unable to detect version control system. Checked: Git, Mercurial, Subversion. Not installed: Darcs, Bazaar, Fossil, Pijul.
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
The command '/bin/sh -c pip install --upgrade pip &&     pip wheel --no-deps --wheel-dir dist ./src' returned a non-zero code: 1
ERROR: Service 'ag' failed to build : Build failed
aasseman commented 1 year ago

We got CI builds now, so if you're fine with the vanilla build you can use https://github.com/semiotic-ai/autoagora/pkgs/container/autoagora

The problem you encountered may be due to the fact that poetry-dynamic-versioning is looking for the .git/ directory for tags information. So if you downloaded an archive of the repo instead of doing git clone, the git information would indeed be missing.

In any case, we're planning to bake the version info directly into the pyproject.toml instead of being too fancy, to avoid those kinds of issues.

cryptovestor21 commented 1 year ago

Thank you Alexis I will take look at the builds and make a plan to move over.

Sent from Proton Mail for iOS

On Mon, Jun 5, 2023 at 19:33, Alexis Asseman @.***(mailto:On Mon, Jun 5, 2023 at 19:33, Alexis Asseman < wrote:

We got CI builds now, so if you're fine with the vanilla build you can use https://github.com/semiotic-ai/autoagora/pkgs/container/autoagora

The problem you encountered may be due to the fact that poetry-dynamic-versioning is looking for the .git/ directory for tags information. So if you downloaded an archive of the repo instead of doing git clone, the git information would indeed be missing.

In any case, we're planning to bake the version info directly into the pyproject.toml instead of being too fancy, to avoid those kinds of issues.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>