xs1-api-client-3.0.0 git error during build #63

Closed
opened 1 year ago by onkelbeh · 1 comments
onkelbeh commented 1 year ago
Owner
 * Package:    dev-python/xs1-api-client-3.0.0
 * Repository: HomeAssistantRepository
 * Maintainer: b@edevau.net
 * Upstream:   mail@markusressel.de
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_7 userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking xs1-api-client-3.0.0.tar.gz to /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work
>>> Preparing source in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work/xs1_api_client-3.0.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work/xs1_api_client-3.0.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work/xs1_api_client-3.0.0 ...
 * python3_7: running distutils-r1_run_phase distutils-r1_python_compile
python3.7 setup.py build -j 10
fatal: not a git repository (or any parent up to mount point /var/tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    GIT_BRANCH = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"])
  File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'rev-parse', '--abbrev-ref', 'HEAD']' returned non-zero exit status 128.
 * ERROR: dev-python/xs1-api-client-3.0.0::HomeAssistantRepository failed (compile phase):
 *   (no error message)
 *
``` * Package: dev-python/xs1-api-client-3.0.0 * Repository: HomeAssistantRepository * Maintainer: b@edevau.net * Upstream: mail@markusressel.de * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_7 userland_GNU * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking xs1-api-client-3.0.0.tar.gz to /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work >>> Source unpacked in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work >>> Preparing source in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work/xs1_api_client-3.0.0 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work/xs1_api_client-3.0.0 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-python/xs1-api-client-3.0.0/work/xs1_api_client-3.0.0 ... * python3_7: running distutils-r1_run_phase distutils-r1_python_compile python3.7 setup.py build -j 10 fatal: not a git repository (or any parent up to mount point /var/tmp) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). Traceback (most recent call last): File "setup.py", line 7, in <module> GIT_BRANCH = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]) File "/usr/lib/python3.7/subprocess.py", line 411, in check_output **kwargs).stdout File "/usr/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['git', 'rev-parse', '--abbrev-ref', 'HEAD']' returned non-zero exit status 128. * ERROR: dev-python/xs1-api-client-3.0.0::HomeAssistantRepository failed (compile phase): * (no error message) * ```
onkelbeh added this to the Compile with tests 0.114.4 (Python 3.7) milestone 1 year ago
onkelbeh added the
bug
label 1 year ago
onkelbeh self-assigned this 1 year ago
Poster
Owner
GIT_BRANCH = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"])
GIT_BRANCH = GIT_BRANCH.decode()  # convert to standard string
GIT_BRANCH = GIT_BRANCH.rstrip()  # remove unnecessary whitespace

... this won't work if you are not on a git, we have to pacth this:

sed -i "s/subprocess.check_output(\[\"git\", \"rev-parse\", \"--abbrev-ref\", \"HEAD\"\])/'master'/" -i setup.py || die
sed -i "s/GIT_BRANCH = GIT_BRANCH.decode()  //" -i setup.py || die

also SDIST packackage at Pypi is missing 'requiremts.txt', change
SRC_URI="https://github.com/markusressel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

next it tried to install a 'tests' package at top level:
sed -i "s/packages=find_packages()/packages=find_packages(exclude=['tests','tests.*'])/g" -i setup.py || die

fixed in: f419a34067

```python GIT_BRANCH = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]) GIT_BRANCH = GIT_BRANCH.decode() # convert to standard string GIT_BRANCH = GIT_BRANCH.rstrip() # remove unnecessary whitespace ``` ... this won't work if you are not on a git, we have to pacth this: ```bash sed -i "s/subprocess.check_output(\[\"git\", \"rev-parse\", \"--abbrev-ref\", \"HEAD\"\])/'master'/" -i setup.py || die sed -i "s/GIT_BRANCH = GIT_BRANCH.decode() //" -i setup.py || die ``` also SDIST packackage at Pypi is missing 'requiremts.txt', change `SRC_URI="https://github.com/markusressel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"` next it tried to install a 'tests' package at top level: `sed -i "s/packages=find_packages()/packages=find_packages(exclude=['tests','tests.*'])/g" -i setup.py || die` fixed in: https://git.edevau.net/onkelbeh/HomeAssistantRepository/commit/f419a3406772105f959275ab720f434ed9fddecd
onkelbeh closed this issue 1 year ago
Sign in to join this conversation.
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.