Code Monkey home page Code Monkey logo

Comments (10)

frostming avatar frostming commented on June 11, 2024

Maybe

Is the project installable as a Python package?

from pdm.

noamraph avatar noamraph commented on June 11, 2024

It is better, but feels still confusing to me.

The truth is, I don't know exactly the intended meaning of the question.

Cargo has two modes: executable (cargo init hello), and library (cargo init --lib hello). Perhaps this should be the first question?

I don't know what's exactly the intent of a "non-installable" project. It seems to me that the main reason for using something like pdm is to allow others or myself to install what I did on another environment and have it work. Why not always define a package?

from pdm.

frostming avatar frostming commented on June 11, 2024

A typical web app is not installable right? People don't want to specify the extra info that is only required for an installable package.

from pdm.

noamraph avatar noamraph commented on June 11, 2024

What exactly is the extra info? I wouldn't mind an extra "description" question that I can leave blank. And regarding version, I think that it's reasonable to just always start with "0.1.0", as Cargo does. Are there any additional questions?

from pdm.

frostming avatar frostming commented on June 11, 2024

No all people like to install the project every time: #2492 (comment)

from pdm.

noamraph avatar noamraph commented on June 11, 2024

I don't think I really understand the use case of --no-self - what's the advantage of not having the project package installed? Is it a way to just specify a venv with some dependencies, without .py files in the directories installed?

If so, I think those are 3 distinct uses:

  1. A library
  2. An executable
  3. A venv

WDYT?

from pdm.

sanmai-NL avatar sanmai-NL commented on June 11, 2024

@noamraph --no-self allows one to install the dependencies. When the developer changes their own product's source code, they can install it without having to iterate all the dependencies. This can then be leveraged for optimized builds, e.g. for container images.

from pdm.

noamraph avatar noamraph commented on June 11, 2024

@sanmai-NL from what I see, the "self" package is installed in the venv in editable mode, so when the developer changes their own product's source code, it is automatically available in the venv. So I'm sorry, I still don't understand: when would you use --no-self (or package-type = "application", which seems to do the same thing)?

from pdm.

sanmai-NL avatar sanmai-NL commented on June 11, 2024

I'm not claiming there are no alternative workflows, just noting a possible need from another user's perspective.

I don't install editable packages in container images, as they're not supposed to be editable there.

from pdm.

frostming avatar frostming commented on June 11, 2024
  • A library
  • An executable
  • A venv

Didn't you make a folder with many scripts or a Django app that can't be installed from PyPI?

from pdm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.