Git Product home page Git Product logo

python-install's Introduction

python-install

A simple, correct PEP427 wheel installer.

$ python -m install -h
usage: python -m install [-h] [--verbose] [--optimize [level [level ...]]] [--destdir /] [--verify-dependencies] [--cache] [--skip-build] [--ignore-incomplete-installation-warnings] [wheel]

positional arguments:
  wheel                 wheel file to install

optional arguments:
  -h, --help            show this help message and exit
  --verbose, -v         enable verbose output
  --optimize [level [level ...]], -o [level [level ...]]
                        optimization level(s) (default=0, 1, 2)
  --destdir /, -d /     destination directory
  --verify-dependencies, -t
                        check if the dependencies are met
  --cache, -c           generate the installation cache
  --skip-build, -s      skip the cache building step, requires cache to be present already
  --ignore-incomplete-installation-warnings, -w
                        stop treating incomplete installation warnings as errors

Missing components:

  • Checksum verification
  • Custom data installation:
    • headers
    • data

python-install's People

Contributors

ffy00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-install's Issues

Wheel Specification

Okay, I am creating this issue to keep track of undefined wheel behaviors, special setuptools handlings and relevant missing features from the wheel spec. The intent is to figure out all issues with the current wheel specification and maybe in the future draft a PEP.

Questions

  • Is .data directly mapped to sysconfig?
    • Even on Windows?
      • Because then we would have a Linux style directory structure (share/something/mydata)

Missing features

  • Support for sysconfdir
    • Holds application configuration data
    • Would also require it to be added in the sysconfig module
    • Usually mapped to /etc on Linux
  • Custom platform-dependent paths
    • A valid use case would be for eg. install UDEV rules on Linux

cc @pradyunsg
Maybe you are interested.

Should we check if dependencies are met?

I am not sure about this. This would be a feature for end users wanting to install wheels this way, but if you care about dependencies you might want to use a package manager like pip.

If we do check for dependencies, there will be a CLI option to turn it off/on (the opposite of whatever the default is). Like we have in https://github.com/FFY00/python-build.

Add option for `--prefix` and `--root`

I want the --prefix and --root arguments to work as it is done on setuptools/distutils (when using setup.py install) or pip's.

I was trying to use this on MSYS2's packages but I couldn't find an option to change the prefix without which it would use absolute windows path which can't be used in packages. For example, see file difference on a CI run here.

Thanks for this project.

Handle extras

See https://packaging.python.org/specifications/entry-points/

Trying to install black's wheel with python-install, will produce the binary blackd with the following contents:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from blackd import patched_main [d]
if __name__ == "__main__":
    sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
    sys.exit(patched_main [d]())

which of course doesn't work. python-install should not include the [d] in the file.

This is the contents of entry_points.txt for black's wheel:

[console_scripts]
black = black:patched_main
black-primer = black_primer.cli:main
blackd = blackd:patched_main [d]

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.