[MacPorts] #39939: Documentation: subports
#39939: Documentation: subports -------------------------+--------------------- Reporter: software@… | Owner: markd@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: 2.2.0 Keywords: | Port: -------------------------+--------------------- I asked the following on the mailing list, and noted that this is not mentioned on the guide nor in the man page. Could this be added there? Freek Dijkstra asked:
I've just created a Portfile for a python module, and like to test this. My normal action is just cd to the folder where the Portfile is located and type "port build".
However, I'm getting an error:
`---> Computing dependencies for py-pypdf2`
`Error: Dependency 'py27-pypdf2' not found.`
I realised I don't want to build py-pypdf2 but rather py27-pypdf2. How do I specify the Python version to use? "port build py27-pypdf2" seems to check the Port database, and ignores the local folder.
Jeremy Lavergne answered:
You want to append "subport=$name" to the command:
`sudo port build subport=py27-pypdf2`
-- Ticket URL: <https://trac.macports.org/ticket/39939> MacPorts <http://www.macports.org/> Ports system for OS X
#39939: Documentation: subports --------------------------+--------------------- Reporter: software@… | Owner: markd@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: 2.2.0 Resolution: | Keywords: Port: | --------------------------+--------------------- Comment (by larryv@…): This is kinda-sorta mentioned in the port(1) man page, in the sense that “`subport=py27-pypdf2`” is just a regular option/value pair, like “`configure.compiler=macports-gcc-4.8`” or “`use_parallel_build=no`”. Specifying option/value pairs on the command line is covered in the first paragraph, albeit extremely briefly. Does the guide mention that you can build from the current directory? -- Ticket URL: <https://trac.macports.org/ticket/39939#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#39939: Documentation: subports --------------------------+--------------------- Reporter: software@… | Owner: markd@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: 2.2.0 Resolution: | Keywords: Port: | --------------------------+--------------------- Comment (by egall@…): This is a duplicate of #36957 -- Ticket URL: <https://trac.macports.org/ticket/39939#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#39939: Document the "subport=" command line option --------------------------+--------------------- Reporter: software@… | Owner: markd@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: 2.2.0 Resolution: | Keywords: Port: | --------------------------+--------------------- Comment (by larryv@…): Replying to [comment:3 egall@…]:
This is a duplicate of #36957
This isn’t really the same. The other ticket is about documenting the use of the “subport” option in Portfiles, which is fine and should happen. This one is about whether to call out the use of “`subport=foo`” on the command line, which I don’t think we should do. (We don’t explain how to set any other command-line option/value pairs, either, because using them is not supported.) -- Ticket URL: <https://trac.macports.org/ticket/39939#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#39939: Document the "subport=" command line option --------------------------+-------------------------------- Reporter: software@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: Resolution: | Keywords: Port: | --------------------------+-------------------------------- Changes (by mf2k@…): * owner: markd@… => macports-tickets@… * version: 2.2.0 => Comment: markd has retired. See #44782. -- Ticket URL: <https://trac.macports.org/ticket/39939#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts