Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation should work even without git #2259

Open
ttusar opened this issue Jan 25, 2024 · 1 comment
Open

Installation should work even without git #2259

ttusar opened this issue Jan 25, 2024 · 1 comment

Comments

@ttusar
Copy link
Contributor

ttusar commented Jan 25, 2024

Right now, installing cocoex in the development branch assumes the repository was cloned with git. If this is not the case, it fails with the following error:

(coco) C:\Users\Tea\Downloads\coco-development>python scripts/fabricate
Traceback (most recent call last):
  File "C:\Users\Tea\Downloads\coco-development\scripts\fabricate", line 232, in <module>
    COCO_VERSION = git_version()
                   ^^^^^^^^^^^^^
  File "C:\Users\Tea\Downloads\coco-development\scripts\fabricate", line 140, in git_version
    res = git(['describe', '--tags']).lstrip("v").split("-")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tea\Downloads\coco-development\scripts\fabricate", line 128, in git
    output = subprocess.check_output(full_command,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tea\anaconda3\envs\coco\Lib\subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tea\anaconda3\envs\coco\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'describe', '--tags']' returned non-zero exit status 128.
olafmersmann added a commit that referenced this issue Feb 13, 2024
Currently fabricate expects to be run from inside a git checkout so
that it can derive the version number from the git tags. This breaks
building cocopp / cocoex from a ZIP file download from GitHub.

Instead of erring out, this commit uses a default version number of
'99.0.1' for the build.

Fixes #2259
@olafmersmann
Copy link
Contributor

Added a simple fix to the development branch. Maybe we should also output some warning since it's a not actively tested build setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants