eugh. which is doing the...build failed first time...
# pact-python
m
eugh. which is doing the...build failed first time on my repo, but worked with a retry 😞
e
Want to check now? So this deals with both the case of the binaries being specified and not. I’ve only quickly glanced at the code
m
I couldn't actually see how you're able to provide a specific path to it 🤔 The logic was definitely broken before as it had straight away if None then replace with where it goes, which is fine if you have the file already I should add in a before and after for reference in the PR This is one of those, I was trying to look at the message examples but ended up with a tangent while trying to get it working at all 😀
e
Let me have a look this morning. We'll try and pull out the old pr
Ok seems to make sense - never understood that code and looking at comments on the closed PR I think it was called out and I shouldn’t have merged it apologies. It ran locally for me (and could do a develop install without specifying the binaries) I’ll consider doing a release later
m
👍 Probably not worth a user release yet, I don't think anything else has changed from that pov so should be fine if anyone is pulling the repo down as is
Trying to make sense of some message examples but having discussions where to put them with @Yousaf Nabi (pactflow.io) so may or may not end up here 🤔
👍 2
m
FYI after several years of trying different approaches, my recommendation is to simply download and embed the standalone (or FFI libs) all into the distribution. It might make it a bit bigger, but space is cheaper than dealing with corporate proxies!
The issue is that downloading at install time introduces more places a failure can happen - the download, the zip etc. And allowing users to specify a pre-defined location makes drift possible, upgrades harder for users and introduces more checks needed to determine the source of the problem for maintainers
m
This was for a maintainer rather than for users but yes agree it probably confuses things [having as an option at all] 🙂 Packaging up in general... a problem for another day! Assuming it's some effectively dead code paths, I'm not sure how you would specify the one you did want to use 🤔 I got this error, unless pact/bin already existed with the .tar.gz file
Copy code
mgeeves@bearly:~/dev/GitHub/mikegeeves/pact-foundation/pact-python$ git status
HEAD detached at c17ac70
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.venv/

nothing added to commit but untracked files present (use "git add" to track)
mgeeves@bearly:~/dev/GitHub/mikegeeves/pact-foundation/pact-python$ make deps
pip install -r requirements_dev.txt -e .
Obtaining file:///home/mgeeves/dev/GitHub/mikegeeves/pact-foundation/pact-python
  Preparing metadata (setup.py) ... done
Requirement already satisfied: Click>=2.0.0 in /home/mgeeves/dev/GitHub/mikegeeves/pact-examples/.venv/lib/python3.9/site-packages (from -r requirements_dev.txt (line 1)) (7.1.2)

<snip>

Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/mgeeves/dev/GitHub/mikegeeves/pact-examples/.venv/lib/python3.9/site-packages (from pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2->fastapi>=0.67.0->pact-python==1.5.2) (4.2.0)
Installing collected packages: tox-travis, pact-python
  Running setup.py develop for pact-python
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [38 lines of output]
        running develop
        running egg_info
        writing pact_python.egg-info/PKG-INFO
        writing dependency_links to pact_python.egg-info/dependency_links.txt
        writing entry points to pact_python.egg-info/entry_points.txt
        writing requirements to pact_python.egg-info/requires.txt
        writing top-level names to pact_python.egg-info/top_level.txt
        adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*')
        reading manifest file 'pact_python.egg-info/SOURCES.txt'
        reading manifest template '<http://MANIFEST.in|MANIFEST.in>'
        warning: no files found matching 'pact/bin/*'
        no previously-included directories found matching 'pact/test'
        no previously-included directories found matching 'e2e'
        writing manifest file 'pact_python.egg-info/SOURCES.txt'
        running build_ext
        Creating /home/mgeeves/dev/GitHub/mikegeeves/pact-examples/.venv/lib/python3.9/site-packages/pact-python.egg-link (link to .)
        Adding pact-python 1.5.2 to easy-install.pth file
        Installing pact-verifier script to /home/mgeeves/dev/GitHub/mikegeeves/pact-examples/.venv/bin
        
        Installed /home/mgeeves/dev/GitHub/mikegeeves/pact-foundation/pact-python
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/home/mgeeves/dev/GitHub/mikegeeves/pact-foundation/pact-python/setup.py", line 212, in <module>
            setup(
          File "/home/mgeeves/dev/GitHub/mikegeeves/pact-examples/.venv/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
            return distutils.core.setup(**attrs)
          File "/home/mgeeves/.pyenv/versions/3.9.6/lib/python3.9/distutils/core.py", line 148, in setup
            dist.run_commands()
          File "/home/mgeeves/.pyenv/versions/3.9.6/lib/python3.9/distutils/dist.py", line 966, in run_commands
            self.run_command(cmd)
          File "/home/mgeeves/.pyenv/versions/3.9.6/lib/python3.9/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/home/mgeeves/dev/GitHub/mikegeeves/pact-foundation/pact-python/setup.py", line 64, in run
            install_ruby_app(package_bin_path, download_bin_path=None)
          File "/home/mgeeves/dev/GitHub/mikegeeves/pact-foundation/pact-python/setup.py", line 118, in install_ruby_app
            raise RuntimeError('Could not find {} binary.'.format(path))
        RuntimeError: Could not find /home/mgeeves/dev/GitHub/mikegeeves/pact-foundation/pact-python/pact/bin/pact-1.88.83-linux-x86_64.tar.gz binary.
        [end of output]
[rewording because I'm incoherent before my coffee kicks in]
😆 1
m
This is one of those, I was trying to look at the message examples but ended up with a tangent while trying to get it working at all
A first for everything Mike!
So I don’t fully understand the above thread, I suspect I’m missing some context - how can I help (if at all)?
m
All good thanks, it's merged in, hopefully slightly nicer DX for now, hopefully nothing broken
👌 1