Skip to content

Using hitchdev without the venv #2

@jayvdb

Description

@jayvdb

I am trying to validate the strictyaml library on openSUSE Tumbleweed as part of packaging it. It seems its only test suite is the stories. The process of testing is not as simple or obvious as the docs make it seem. Even when I attempt it locally on my workstation, hk bdd emits a sea of red, listing all of the stories.

My project is at https://build.opensuse.org/project/show/home:jayvdb:hitch/ All of the hitch components and dependencies are there. The build VMs are isolated from the internet, so the components need to use pre-installed software, not fetching stuff from the internet.

I have fiddled with hitchkey a bit, trying to use --system-site-packages , but that doesnt completely solve the problem, as then hitchrun library is available in the venv, but the executable is not. These are commented out at https://build.opensuse.org/package/view_file/home:jayvdb:hitch/python-hitchkey/python-hitchkey.spec?expand=1

https://build.opensuse.org/package/view_file/home:jayvdb:hitch/python-hitchkey/python-hitchkey.spec?expand=1 contains some more hacks to attempt to get it working. It looks like I got hitchrun running ... and then

Currently the error is

[  150s] + hk bdd
[  151s] Traceback (most recent call last):
[  151s]   File "/home/abuild/.hitch/qr119r/hvenv/bin/hitchrun", line 11, in <module>
[  151s]     load_entry_point('hitchrun==0.3.2', 'console_scripts', 'hitchrun')()
[  151s]   File "/usr/lib/python3.7/site-packages/hitchrun/commandline.py", line 16, in run
[  151s]     packages.ensure_hitchreqs_synced()
[  151s]   File "/usr/lib/python3.7/site-packages/hitchrun/packages.py", line 146, in ensure_hitchreqs_synced
[  151s]     path = paths()
[  151s]   File "/usr/lib/python3.7/site-packages/hitchrun/packages.py", line 68, in paths
[  151s]     key=Path(hvenv().joinpath("linkfile").bytes().decode("utf8").strip()),
[  151s]   File "/usr/lib/python3.7/site-packages/path/__init__.py", line 664, in bytes
[  151s]     with self.open('rb') as f:
[  151s]   File "/usr/lib/python3.7/site-packages/path/__init__.py", line 660, in open
[  151s]     return io.open(self, *args, **kwargs)
[  151s] FileNotFoundError: [Errno 2] No such file or directory: Path('/usr/linkfile')

It looks like I would need to seriously hack at hitchkey and friends to rip out the venv stuff. I cant see a way to disable it in the current codebase.
Would you be interested in having it added as a feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions