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

Update Layout for python portfile #10

Merged
merged 1 commit into from May 22, 2019
Merged

Conversation

Korusuke
Copy link
Member

Issue #5

Two blank lines feel weird but that is what works :)

@Korusuke Korusuke requested a review from reneeotten May 19, 2019 16:44
@Korusuke
Copy link
Member Author

This is the output after current changes:

setuptools :

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools

    livecheck.type  none
}

upt :

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools

    depends_lib-append \
                    port:py${python.version}-spdx-lookup

    livecheck.type  none
}

pytest :

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools

    depends_lib-append \
                    port:py${python.version}-atomicwrites \
                    ...
                    port:py${python.version}-wcwidth

    depends_test-append \
                    port:py${python.version}-argcomplete \
                    ...
                    port:py${python.version}-requests

    livecheck.type  none
}

@reneeotten
Copy link
Contributor

Two blank lines feel weird but that is what works :)

It indeed works, but I agree with you that it looks a little weird in the template. I would need to look a bit more at the ninja syntax if there is some other way that will give the same output - it not, I guess this would be okay.

@reneeotten
Copy link
Contributor

okay, I spend an hour or so looking at the documentation and doing some trial-and-error attempts to get the newlines where we want them..... I was hoping for a more of "what-you-see-is-what-you-get" approach by putting the empty lines where we actually want them, but without much/any success ;)
There are settings in upt_macports.py that probably determine some of this stuff for the ninja2 templates, but I haven't figured it out yet.

Since your solution works, despite the slight weirdness of the two empty lines in the template, I am inclined to merge this as "it works and probably nobody is going to change this anymore". Unless @Steap has some insight and we can come up quickly with something else; otherwise let's move on and we can look at this again if we're bored!

@Steap
Copy link
Collaborator

Steap commented May 22, 2019

@reneeotten Yeah, there are also a few variables (such as keep_trailing_newline) that are interesting when creating the Jinja2 environment, but I can never understand/remember how everything works.

Let's merge this :)

@Steap Steap merged commit 156b5ed into macports:master May 22, 2019
@Korusuke Korusuke deleted the layout_python branch May 22, 2019 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants