question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run console scripts whose name doesn't match package name

See original GitHub issue

For eg:

$ pipx run textflip            
'textflip' executable script not found in package 'textflip'. Available
executable scripts: flip

So it does know about the script named flip, but I can’t seem to figure out how to make it run that.

I’ve tried doing:

  • pipx run textflip.flip
  • pipx run textflip --spec flip
  • pipx run textflip flip etc.

None of these seem to work, and I can’t seem to find the relevant documentation.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Sep 9, 2021

Maybe some extra metadata could be added into pyproject.toml to tell it what the default runnable module is inside this package.

There’s already a mechanism for that introduced in #615. For a package named foobar, the package author can define a pipx.run entry point named foobar (same name as the package) and pipx will pick it up as the default command. Then you’re free to name your console_scripts whatever you want.

I could take it up if you want!

Go ahead!

0reactions
cs01commented, Sep 9, 2021

I just did a quick search from my phone, but didn’t see it in the docs — is pipx.run captured in our documentation anywhere? We should add a section dedicated to adding pipx support for one’s package and add that to it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Call a chocolatey package in powershell based on its ...
Short of crawling the $env:ChocolateyInstall\lib\packageName directory for potential automatic shim names, or the chocolateyInstall.ps1 / ...
Read more >
2. Writing the Setup Script — Python 3.11.1 documentation
in your setup script. The keys to this dictionary are package names, and an empty package name stands for the root package. The...
Read more >
Configure the app module - Android Developers
Every Android app has a unique application ID that looks like a Java or Kotlin package name, such as com.example.myapp.
Read more >
Create a package - AWS Systems Manager
On the Distributor home page, choose Create package, and then choose Simple. On the Create package page, enter a name for your package....
Read more >
Find-Package (PackageManagement) - PowerShell
Commands with the same name differ in their specific arguments. ... see the PowerShell reference documentation for the Package Manager Console of Visual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found