OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to configure pip to install a script to the environment bin/ folder?

  • Thread starter Thread starter vs07
  • Start date Start date
V

vs07

Guest
I'm writing a package in Python, and I want possible users to install a command to their system by installing with pip. A package that I want to copy the installation behavior of is gdown. When you install this, a gdown python executable is put inside the environment's (whether it's global or a virtual environment) bin/ folder, so that gdown can be called from the command line.

How do I replicate this behavior? I tried to look at the code in the repository but I can't seem to find the code that does this.
<p>I'm writing a package in Python, and I want possible users to install a command to their system by installing with <code>pip</code>. A package that I want to copy the installation behavior of is <a href="https://github.com/wkentaro/gdown/blob/main/pyproject.toml" rel="nofollow noreferrer"><code>gdown</code></a>. When you install this, a <code>gdown</code> python executable is put inside the environment's (whether it's global or a virtual environment) <code>bin/</code> folder, so that <code>gdown</code> can be called from the command line.</p>
<p>How do I replicate this behavior? I tried to look at the code in the repository but I can't seem to find the code that does this.</p>
 

Latest posts

D
Replies
0
Views
1
Danish Karmally
D
Top