Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bashhub-client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Ryan Caloras
  • bashhub-client
  • Merge requests
  • !119

Update `bin` path and other install fixes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Mavaddat Javid requested to merge github/fork/mavaddat/patch-1 into master Feb 24, 2023
  • Overview 4
  • Commits 3
  • Pipelines 1
  • Changes 2

This PR introduces multiple fixups for the broken installer.

Binaries path

The bin path for virtual env is now ../env/local/bin.

Here is one line in virtualenv tests that confirm this change: /tests/unit/discovery/py_info/test_py_info.py#L331

Robustify virtualenv installer

The recommended zipapp way to install the latest virtualenv is given here.

Fix __version__ injection

Using exec to import the version is anti-pattern, unpythonic, and fragile. What's more, it does not work, because the Python interpreter is looking in the CWD for the bashhub/version.py whereas it actually needs to look in the script location. The script location is found using the ugly method below:

import os
import sys

exec (open(os.path.join(os.path.dirname(sys.argv[0]),'./bashhub/version.py')).read())
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mavaddat/patch-1