mpkg package variants
Ryan Schmidt
ryandesign at macports.org
Sun Oct 6 13:17:47 UTC 2019
On Oct 6, 2019, at 07:55, Werner LEMBERG wrote:
>>>> I believe you can just specify the variants that you want (for the
>>>> port and all of its dependencies) at the command line when you run
>>>> `port mpkg`, can't you? As in:
>>>>
>>>> sudo port mpkg lilypond-devel +mactex +perl5_28
>>>
>>> This seems to work, thanks! Maybe it's worth to document that.
>>
>> Surely it's already documented that variants you specify are passed
>> down to any dependencies that get built (but not to any that don't
>> need to be built)?
>
> If it is, I have missed that.
As I've said before, the guide needs to be thrown out and rewritten from scratch. But... it does say "MacPorts will also use the specified variants for any dependencies":
https://guide.macports.org/#using.variants.invoking
>> But maybe it is worth mentioning that for mpkg, all packages get
>> rebuilt, so the specified variants are applied to all of the ports,
>> even those that were already installed (if that's not already
>> mentioned in the guide).
>
> It's either missing or I have missed that, too :-)
I don't see any mention of it here:
https://guide.macports.org/#using.binaries.binary-packages
The guide sources are here if anyone wants to contribute an improvement:
https://github.com/macports/macports-guide/
>>> Of course, the next question is whether MacPorts variant strings
>>> form a consistent set without contradictions.
>>
>> What does that mean?
>
> Since MacPorts contains thousands of packages there might be a clash
> somewhere in the variant names. Assuming that package X needs
> `+foo' and package Y needs `-foo', I would have to specify
>
> mpkg ... +foo -foo
>
> which obviously doesn't work.
Right, that wouldn't work. Port authors can of course name variants as they choose and define them to do anything, so the situation you propose is theoretically possible, but I don't think you'll encounter it. If you do, file a bug report and maybe something can be changed.
>> As for test files, if you mean tests that get run by the `port test`
>> command, then I would not expect those to be installed by a port;
>> they would be used at test time and would not be needed afterwards.
>
> I'm not sure about the `port test` thing, but the python 2.7 and 3.7
> bundles contains zillions of files in directories
>
> .../Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test
> .../Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest
>
> and
>
> .../Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test
> .../Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest
>
> Are these files of any use after installation?
I am not very familiar with python, but my guess is that they must be useful, otherwise nobody would have written code to install them.
A quick search suggests that unittest, for example, is a unit testing framework that python modules might use in implementing their own tests:
https://docs.python.org/2/library/unittest.html
More information about the macports-users
mailing list