Opened 11 years ago

Last modified 10 years ago

#39939 new enhancement

Document the "subport=" command line option

Reported by: macfreek (Freek Dijkstra) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: guide Version:
Keywords: Cc: nonstop.server@…
Port:

Description

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

Change History (5)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

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?

Last edited 11 years ago by larryv (Lawrence Velázquez) (previous) (diff)

comment:2 Changed 11 years ago by nonstop.server@…

Cc: nonstop.server@… added

Cc Me!

comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)

This is a duplicate of #36957

comment:4 in reply to:  3 Changed 11 years ago by larryv (Lawrence Velázquez)

Summary: Documentation: subportsDocument the "subport=" command line option

Replying to 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.)

comment:5 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from markd@… to macports-tickets@…
Version: 2.2.0

markd has retired. See #44782.

Note: See TracTickets for help on using tickets.