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

[Task] Setup Git archives for setuptools-scm #4

Open
njzjz opened this issue Apr 13, 2024 · 0 comments
Open

[Task] Setup Git archives for setuptools-scm #4

njzjz opened this issue Apr 13, 2024 · 0 comments
Assignees

Comments

@njzjz
Copy link
Collaborator

njzjz commented Apr 13, 2024

When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:


import os

git_archival_content = r"""node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
"""

if os.path.isfile("pyproject.toml"):
    with open("pyproject.toml") as f:
        pyproject = f.read()
    if "setuptools_scm" in pyproject:
        if not os.path.isfile(".git_archival.txt"):
            with open(".git_archival.txt", 'w') as f:
                f.write(git_archival_content)
            with open(".gitattributes", 'a') as f:
                print(".git_archival.txt  export-subst", file=f)

            # bump setuptools_scm version
            pyproject = pyproject.replace("setuptools_scm[toml]>=6.2", "setuptools_scm[toml]>=7")
            with open("pyproject.toml", 'w') as f:
                f.write(pyproject)
elif os.path.isfile("setup.py"):
    with open("setup.py") as f:
        setuppy = f.read()
    if "setuptools_scm" in setuppy:
        if not os.path.isfile(".git_archival.txt"):
            with open(".git_archival.txt", 'w') as f:
                f.write(git_archival_content)
            with open(".gitattributes", 'a') as f:
                print(".git_archival.txt  export-subst", file=f)
multi-gitter run "python $PWD/add-git-archive.py" --author-email "48687836+njzjz-bot@users.noreply.github.com" --author-name "njzjz-bot[bot]" -B add-git-archive --fork -m 'feat(build): Add Git archives version files

When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: https://github.com/njzjz-bot/njzjz-bot/issues/4.
' --git-type cmd -O deepmodeling  
@njzjz njzjz self-assigned this Apr 13, 2024
njzjz-bot added a commit to njzjz-bot/deepmd-kit that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpgen that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpdata that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/reacnetgenerator that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/deepks-kit that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dargs that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/rid-kit that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpti that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/DMFF that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpgen2 that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/deepmodeling_sphinx that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/deepflame-dev that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpdispatcher that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/pbsmonitor that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/zhihubackup that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpamber that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/qiuwenbot that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpdata_ani that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/dpdata_qdpi that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/gdriveupload that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/fakegaussian that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/openbabel-wheel that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/comparemol that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/lammps-wheel that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
njzjz-bot added a commit to njzjz-bot/nodejs-wheel that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
wanghan-iapcm pushed a commit to deepmodeling/dpgen that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or
the mirror, there is no Git version information, making setuptools-scm
unable to read the version. The alternative way is to add a git archive
file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives
(available in setuptools-scm 7.0.0)
*
https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
*
https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
wanghan-iapcm pushed a commit to deepmodeling/dpgen2 that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or
the mirror, there is no Git version information, making setuptools-scm
unable to read the version. The alternative way is to add a git archive
file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives
(available in setuptools-scm 7.0.0)
*
https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
*
https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
wanghan-iapcm pushed a commit to deepmodeling/dpdata that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or
the mirror, there is no Git version information, making setuptools-scm
unable to read the version. The alternative way is to add a git archive
file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives
(available in setuptools-scm 7.0.0)
*
https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
*
https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
github-merge-queue bot pushed a commit to deepmodeling/reacnetgenerator that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or
the mirror, there is no Git version information, making setuptools-scm
unable to read the version. The alternative way is to add a git archive
file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives
(available in setuptools-scm 7.0.0)
*
https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
*
https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
github-merge-queue bot pushed a commit to deepmodeling/deepmd-kit that referenced this issue Apr 13, 2024
When downloading the source code of a branch or a release from GitHub or
the mirror, there is no Git version information, making setuptools-scm
unable to read the version. The alternative way is to add a git archive
file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives
(available in setuptools-scm 7.0.0)
*
https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
*
https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant