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

pyln minor fixes, move bolts to pyln.spec.bolt* #3777

Merged
merged 11 commits into from
Jun 25, 2020

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Jun 18, 2020

Fixes #3767

@rustyrussell rustyrussell force-pushed the pyln-setup-fixes branch 3 times, most recently from 8a7fe10 to 7bf03dc Compare June 22, 2020 12:12
Copy link
Member

@cdecker cdecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to bump the bolts individually, and have 4 pyln-bolt? packages to maintain separately? Couldn't we make it a single package? Otherwise this feels a lot like busy work for no real gain.

contrib/pyln-spec/bolt1/setup.py Outdated Show resolved Hide resolved
contrib/pyln-spec/requirements.txt Outdated Show resolved Hide resolved
@rustyrussell
Copy link
Contributor Author

I really do think we want individual packages for the bolts. They will change fast, but this way they only change if something actually changes, not because of an unrelated repository change.

Perhaps an even better option is to number like so: 1.0.., and bump csvversion only when the csv changes. That allows you to specify ==1.0.42.* if you don't care about any textual changes?

Remove non-existant pyln.proto.bolts.  bolts will have separate setup.py, so we
can rev the versions individually.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Contributor Author

OK, since it can't fetch pyln.proto 0.8.3 from the real repo yet, I uploaded it to the test repo, and applied the following workaround for testing (downloads previous version to get all the deps, then gets the latest from testing repo):

diff --git a/contrib/pyln-spec/Makefile b/contrib/pyln-spec/Makefile
index 95b00fc22..081c6443d 100755
--- a/contrib/pyln-spec/Makefile
+++ b/contrib/pyln-spec/Makefile
@@ -58,7 +58,8 @@ test-release-bolt%: $(ARTEFACTS)
        # pyln-proto already installed).
        virtualenv testpypi-$* --python=/usr/bin/python3 --download --always-copy --clear
        # Install the requirements from the prod repo, they are not being kept up to date on the test repo
-       testpypi-$*/bin/python3 -m pip install -r requirements.txt pytest flaky pytest-timeout
+       testpypi-$*/bin/python3 -m pip install pyln.proto pytest flaky pytest-timeout
+       testpypi-$*/bin/python3 -m pip install -I --index-url https://test.pypi.org/simple/ --no-deps pyln.proto
        testpypi-$*/bin/python3 -m pip install -I --index-url https://test.pypi.org/simple/ --no-deps pyln-bolt$*
        testpypi-$*/bin/python3 -c "from pyln.spec import bolt$* as bolt;assert(bolt.__version__ == '$(call version,$*)')"
        testpypi-$*/bin/pytest bolt$*/tests

… indep.

They're almost entirely autogenerated, and we use symlinks into the
top directory to reduce replication.

They can't be under pyln.spec.message, because a package can't also
be a namespace.

We also add fulltext and desc fields, and exclude our "gen" files from
flake8, since the spec quotes contain weird whitespace.

Changelog-Added: Python: pyln.spec.bolt{1,2,4,7} packages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This includes some real bugfixes, since it noticed some places we were
being loose with different types!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1. version was 0.0.2 in setup.py, which means we didn't get the dist/ files we expected.
2. We need 'bdist_wheel' to make the .whl file.
3. --no-site-packaged was apparently removed in 0.20.0, and was default long before that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: pyln.proto version now 0.8.3 to indicate pyln.proto.message
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…nts.txt

We depend on packages, not modules within them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…version.

Now they look like 1.0.1.137, so you can explicitly depend on a csv change
(without caring about a textual change).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Contributor Author

Trivial rebase to fix a typo and an accidental libwally revert!

@cdecker
Copy link
Member

cdecker commented Jun 25, 2020

ACK 39a2a9d

@cdecker cdecker merged commit 8ee8161 into ElementsProject:master Jun 25, 2020
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

Successfully merging this pull request may close these issues.

Missing pyln/proto/message/bolts in pyln-proto
2 participants