:package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.

Overview

THE PROJECT IS ARCHIVED

Forks: https://github.com/orsinium/forks


DepHell

pypi MIT License Travis CI Powered by DepHell

DepHell -- project management for Python.

Why it is better than all other tools:

  1. Format agnostic. You can use DepHell with your favorite format: setup.py, requirements.txt, Pipfile, poetry. DepHell supports them all and much more.
  2. Use your favorite tool on any project. Want to install a poetry based project, but don't like poetry? Just tell DepHell to convert the project's meta information into a setup.py and install it with pip. Or directly work with the project from DepHell, because DepHell can do everything that you usually want to do with packages.
  3. DepHell doesn't try to replace your favorite tools. If you use poetry, you have to use poetry's file formats and commands. However, DepHell can be combined with any other tool or can even combine all these tools together by converting formats. You can use DepHell, poetry, and pip all at the same time.
  4. Easily extendable. DepHell has strong modularity and can be easily extended with new formats and commands.
  5. Developer friendly. We aren't going to place all of our modules into _internal. Also, DepHell has a large ecosystem with separated libraries so you can use only the parts of DepHell that you need.
  6. All-in-one-solution. DepHell can manage dependencies, virtual environments, tests, CLI tools, packages, generate configs, show licenses for dependencies, assist with security audits, get download statistics from PyPI, search packages and much more.
  7. Smart dependency resolution. Sometimes pip and pipenv fail to lock your dependencies. Try to execute pipenv install oslo.utils==1.4.0. Pipenv can't handle it, but DepHell can: dephell deps add --from=Pipfile oslo.utils==1.4.0 to add new dependency and dephell deps convert --from=Pipfile --to=Pipfile.lock to lock it.
  8. Asyncio based. DepHell doesn't support Python 2.7, and that allows us to use modern features to make network and filesystem requests as fast as possible.
  9. Multiple environments. You can have as many environments for project as you want. Separate sphinx dependencies from your main and dev environment. Other tools like pipenv and poetry don't support this.

Features:

See documentation for more details.

Follow @PythonDepHell on Twitter to get updates about new features and releases.

Installation

curl -L dephell.org/install | python3

See installation documentation for alternatives.

Supported formats

  1. Archives:
    1. *.egg-info (egginfo)
    2. *.tar.gz (sdist)
    3. *.whl (wheel)
  2. pip:
    1. requirements.txt (pip)
    2. requirements.lock (piplock)
  3. pipenv:
    1. Pipfile (pipfile)
    2. Pipfile.lock (pipfilelock)
  4. pоetry:
    1. pyproject.toml (poetry)
    2. poetry.lock (poetrylock)
  5. Environment:
    1. Imports in the package (imports).
    2. Installed packages (installed).
  6. Other:
    1. setup.py (setuppy)
    2. flit (flit)
    3. conda's environment.yml (conda)
    4. pyproject.toml build-system requires (pyproject)

Usage

First of all, install DepHell and activate autocomplete:

python3 -m pip install --user dephell[full]
dephell self autocomplete

Let's get sampleproject and make it better.

git clone https://github.com/pypa/sampleproject.git
cd sampleproject

This project uses setup.py for dependencies and metainfo. However, this format is over-complicated for most projects. Let's convert it into poetry:

dephell deps convert --from=setup.py --to=pyproject.toml

It will make next pyproject.toml:

[tool.poetry]
name = "sampleproject"
version = "1.2.0"
description = "A sample Python project"
authors = ["The Python Packaging Authority <[email protected]>"]
readme = "README.md"

[tool.poetry.scripts]
sample = "sample:main"

[tool.poetry.dependencies]
python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,<4,>=2.7"
coverage = {optional = true}
peppercorn = "*"

[tool.poetry.dev-dependencies]
check-manifest = "*"

[tool.poetry.extras]
test = ["coverage"]

Now, let's generate some useful files:

dephell generate authors

dephell generate license MIT

# https://editorconfig.org/
dephell generate editorconfig

Our users probably have not installed poetry, but they are likely to have pip and can install files from setup.py. Let's make it easier to generate setup.py from our pyproject.toml. Also, it points to DepHell as your default dependencies file. Add the following lines in the pyproject.toml:

[tool.dephell.main]
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "setuppy", path = "setup.py"}

You can see a full, real-world example of a config in DepHell's own pyproject.toml.

Now we can call DepHell commands without explicitly specifying from and to:

dephell deps convert

It will make setup.py and README.rst from pyproject.toml and README.md.

Now let's test our code in a virtual environment:

$ dephell venv run pytest
WARNING venv does not exist, creating... (project=/home/gram/Documents/sampleproject, env=main, path=/home/gram/.local/share/dephell/venvs/sampleproject-Whg0/main)
INFO venv created (path=/home/gram/.local/share/dephell/venvs/sampleproject-Whg0/main)
WARNING executable does not found in venv, trying to install... (executable=pytest)
INFO build dependencies graph...
INFO installation...
# ... pip output
# ... pytest output

We can now activate the virtual environment for our project and run any commands inside:

dephell venv shell

Ugh, we have tests, but don't have pytest in our dependencies file. Let's add it:

dephell deps add --envs dev test -- pytest

Afer that our dev-dependencies looks like this:

[tool.poetry.dev-dependencies]
check-manifest = "*"
pytest = "*"

[tool.poetry.extras]
test = ["coverage", "pytest"]

Eventually we will have many more dependencies. Let's look at how many of them we have now:

$ dephell deps tree
- check-manifest [required: *, locked: 0.37, latest: 0.37]
- coverage [required: *, locked: 4.5.3, latest: 4.5.3]
- peppercorn [required: *, locked: 0.6, latest: 0.6]
- pytest [required: *, locked: 4.4.0, latest: 4.4.0]
  - atomicwrites [required: >=1.0, locked: 1.3.0, latest: 1.3.0]
  - attrs [required: >=17.4.0, locked: 19.1.0, latest: 19.1.0]
  - colorama [required: *, locked: 0.4.1, latest: 0.4.1]
  - funcsigs [required: >=1.0, locked: 1.0.2, latest: 1.0.2]
  - more-itertools [required: <6.0.0,>=4.0.0, locked: 5.0.0, latest: 7.0.0]
    - six [required: <2.0.0,>=1.0.0, locked: 1.12.0, latest: 1.12.0]
  - more-itertools [required: >=4.0.0, locked: 7.0.0, latest: 7.0.0]
  - pathlib2 [required: >=2.2.0, locked: 2.3.3, latest: 2.3.3]
    - scandir [required: *, locked: 1.10.0, latest: 1.10.0]
    - six [required: *, locked: 1.12.0, latest: 1.12.0]
  - pluggy [required: >=0.9, locked: 0.9.0, latest: 0.9.0]
  - py [required: >=1.5.0, locked: 1.8.0, latest: 1.8.0]
  - setuptools [required: *, locked: 41.0.0, latest: 41.0.0]
  - six [required: >=1.10.0, locked: 1.12.0, latest: 1.12.0]

Hm...Is it as many as it seems? Let's look at their size.

$ dephell inspect venv --filter=lib_size
11.96Mb

Ugh...Ok, it's Python. Are they actual?

$ dephell deps outdated
[
  {
    "description": "More routines for operating on iterables, beyond itertools",
    "installed": [
      "5.0.0"
    ],
    "latest": "7.0.0",
    "name": "more-itertools",
    "updated": "2019-03-28"
  },
]

Pytest requires old version of more-itertools. That happens.

If our tests and dependencies are OK, it's time to deploy. First of all, increment the project version:

$ dephell project bump minor
INFO generated new version (old=1.2.0, new=1.3.0)

And then build packages:

$ dephell project build
INFO dumping... (format=setuppy)
INFO dumping... (format=egginfo)
INFO dumping... (format=sdist)
INFO dumping... (format=wheel)
INFO builded

Now, we can upload these packages to PyPI:

dephell self auth upload.pypi.org my-username my-password
dephell project upload

These are some of the most useful commands. See documentation for more details.

Compatibility

DepHell is tested on Linux and Mac OS X with Python 3.5, 3.6, 3.7. And one of the coolest things is that DepHell is run by DepHell on Travis CI.

DepHell works on Windows but has no CI to keep in working yet.

How can I help

  1. Star project on Github. Developers believe in the stars.
  2. Tell your fellows that Gram has a made cool thing for you.
  3. Open an issue if you have thoughts on how to make DepHell better.
  4. Things that you can contribute in any project in DepHell ecosystem:
    1. Fix grammar and typos.
    2. Document new things.
    3. Tests, we always need more tests.
    4. Make READMEs more nice and friendly.
    5. View issues with the help wanted label to find things that you can fix.
    6. Anything what you want. If it is a new feature, please, open an issue before writing the code.

Thank you ❤️

Comments
  • ClientConnectorSSLError when trying connect to PyPi

    ClientConnectorSSLError when trying connect to PyPi

    This happens every time I try to execute dephell command that needs connection with PyPi:

    $ dephell deps add --envs dev test -- pytest
    WARNING empty root passed 
    ERROR ClientConnectorSSLError: Cannot connect to host pypi.org:443 ssl:None [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)] 
    

    Other tools (twine, pip, Pipenv) work without any issue

    Any ideas?

    opened by Bobronium 16
  • Commands which change pyproject.toml remove poetry sources

    Commands which change pyproject.toml remove poetry sources

    I think that this one is an actual issue. I'm definitely on 0.7.4 this time. I have a poetry source in my pyproject.toml like this

    [[tool.poetry.source]]
    name = "custom"
    url = "https://my.custom.domain/simple/"
    

    I then use a command which alters the pyproject.toml file, like

    $ dephell project bump patch
    

    Instead of my poetry source, I now have something that looks like this which is invalid TOML I think

    source = []
    
    bug 
    opened by dbanty 14
  • Table output

    Table output

    Convert json output into human-readable table if table specified in the config. There are many libraries for it, choose the nicest without dependencies.

    enhancement good first issue Hacktoberfest 
    opened by orsinium 13
  • ModuleNotFoundError: No module named 'bowler'

    ModuleNotFoundError: No module named 'bowler'

    I use poetry as a dependency manager for my project:

     ✘  ~/PycharmProjects/template-test   dev ●  poetry --version
    Poetry 0.12.17
    

    Also I use dephell as version bumper. In pyproject.toml:

    [tool.poetry.dev-dependencies]
    dephell = "==0.*,>=0.7.5"
    
     ~/PycharmProjects/template-test   dev ●  poetry show bowler
    name        : bowler
    version     : 0.0.1 
    description : a hat 
    

    But I receive an error if call any of dephell commands

     ~/PycharmProjects/template-test   dev ●  poetry run dephell
    Traceback (most recent call last):
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/bin/dephell", line 6, in <module>
        from dephell.cli import entrypoint
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/lib/python3.7/site-packages/dephell/cli.py", line 9, in <module>
        from .commands import COMMANDS
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/lib/python3.7/site-packages/dephell/commands/__init__.py", line 2, in <module>
        from .auth import AuthCommand
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/lib/python3.7/site-packages/dephell/commands/auth.py", line 9, in <module>
        from .base import BaseCommand
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/lib/python3.7/site-packages/dephell/commands/base.py", line 12, in <module>
        from ..actions import attach_deps, get_python_env
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/lib/python3.7/site-packages/dephell/actions/__init__.py", line 16, in <module>
        from ._transform import transform_imports
      File "/Users/Boger/Library/Caches/pypoetry/virtualenvs/template-test-py3.7/lib/python3.7/site-packages/dephell/actions/_transform.py", line 1, in <module>
        from bowler import LN, Capture, Filename, Query
    ModuleNotFoundError: No module named 'bowler'
    

    Also, I have an error when tried to import bowler manually:

     ~/PycharmProjects/template-test   dev ●  poetry run python
    Python 3.7.3 (default, Jul 10 2019, 22:48:45) 
    [Clang 10.0.1 (clang-1001.0.46.4)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import bowler
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'bowler'
    
    opened by b0g3r 12
  • bash-completion: use modern lazy-load directory

    bash-completion: use modern lazy-load directory

    The legacy bash_completion.d directory requires every script be sourced at shell startup, which is slow. Since bash-completion 2.x (released in 2012), completions are loaded on-demand -- a minimal completion stub is defined as the default command completer, which will search for a script in the completionsdir named the same as the command, and source this script in order to update the command completion.

    Make use of this lazy-loaded completion. This entails:

    • moving the installation location
    • getting rid of the legacy modification of .bashrc which is no longer needed
    opened by eli-schwartz 11
  • Is 'dephell package install -e .' a thing?

    Is 'dephell package install -e .' a thing?

    Short description

    How does one install their own package, eg pip install -e .?

    Output

    $ dephell package install -e .
    WARNING cannot find config file 
    WARNING empty root passed 
    INFO build dependencies graph... 
    INFO installation... (executable=redeacted/rww1/main/bin/python3.8, packages=0)
    INFO installed 
    
    
    enhancement command 
    opened by agritheory 9
  • Getting author name from `from` and `project`

    Getting author name from `from` and `project`

    Fix for issue #107 - getting the author name in generate license from from and project config files.

    Please do review this and suggest changes as there may be errors. Thanks!

    opened by nandahkrishna 9
  • dot in package name gets converted to - during convert

    dot in package name gets converted to - during convert

    I was converting poetry project to setuppy and pip. On both, dependency with a dot in name (ex. ruamel.yaml) have its dot replaced by -. Which is wrong for further installations

    bug 
    opened by mpanarin 9
  • setuppy: Allow setup.py to import local modules

    setuppy: Allow setup.py to import local modules

    Add the directory containing setup.py to sys.path during _execute and run_setup, so that import of local modules are successful. These imports may be the package to be installed, or other modules beside setup.py that contain extra logic.

    Related to https://github.com/dephell/dephell/issues/284

    opened by jayvdb 8
  • setup.py package_data should be sorted for smaller diffs

    setup.py package_data should be sorted for smaller diffs

    Whenever I run dephell deps convert --from=pyproject.toml --to=setup.py, the ordering of the package_data={...} dict is unstable and changes between every run. The actual contents don't change, just their ordering.

    We're in the long process of upgrading a particular project from setup.py to Poetry, and as part of our new build process we run dephell deps convert quite frequently. This makes for some very noisy diffs as the resulting setup.py is constantly changing, even though it's not really.

    Would it be possible to sort the keys in package_data before writing them out so that the output only changes whenever something is legitimately different?

    enhancement good first issue Hacktoberfest 
    opened by kstrauser 8
  • How to bump version from pre-release to release?

    How to bump version from pre-release to release?

    Say I'm using semver and I have a candidate 0.2.0-rc.4 which has passed whatever testing process it needed to, and I wanted to release 0.2.0, how do I do that?

    opened by dbanty 8
  • poetry fails on dephell-generated poetry.lock

    poetry fails on dephell-generated poetry.lock

    Short description

    If I try to run poetry install with dephell-generated poetry.lock, it fails

    Traceback

    % poetry install -v
    Using virtualenv: /home/vvk/.cache/pypoetry/virtualenvs/birdfeeder-RTSm1Qke-py3.7
    Installing dependencies from lock file
      
      Stack trace:
      
      9  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py:131 in run
         status_code = command.handle(parsed_args, io)
      
      8  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py:120 in handle
         status_code = self._do_handle(args, io)
      
      7  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py:171 in _do_handle
         return getattr(handler, handler_method)(args, io, self)
      
      6  ~/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py:92 in wrap_handle
         return self.handle()
      
      5  ~/.poetry/lib/poetry/console/commands/install.py:71 in handle
         return_code = self._installer.run()
      
      4  ~/.poetry/lib/poetry/installation/installer.py:103 in run
         return self._do_install(local_repo)
      
      3  ~/.poetry/lib/poetry/installation/installer.py:239 in _do_install
         locked_repository = self._locker.locked_repository(True)
      
      2  ~/.poetry/lib/poetry/packages/locker.py:130 in locked_repository
         package.optional = info["optional"]
      
      1  ~/.poetry/lib/poetry/_vendor/py3.7/tomlkit/items.py:1018 in __getitem__
         return self._value[key]
      
      NonExistentKey
    
      'Key "optional" does not exist.'
    
      at ~/.poetry/lib/poetry/_vendor/py3.7/tomlkit/container.py:576 in __getitem__
          572│             key = Key(key)
          573│
          574│         idx = self._map.get(key, None)
          575│         if idx is None:
        → 576│             raise NonExistentKey(key)
          577│
          578│         if isinstance(idx, tuple):
          579│             # The item we are getting is an out of order table
          580│             # so we need a proxy to retrieve the proper objects
    
    ...
    

    Config

    [tool.dephell.lock] 
    from = {format = "poetry", path = "pyproject.toml"}
    to = {format = "poetrylock", path = "poetry.lock"}
    ...
    

    The problem is that poetry.lock generated by poetry itself contains optional key, while dephell-generated doesn't.

    poetry:

    [[package]]
    category = "dev"
    description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
    name = "appdirs"
    optional = false
    python-versions = "*"
    version = "1.4.4"
    

    dephell:

    [[package]]
    name = "appdirs"
    version = "1.4.4"
    description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
    category = "main"
    

    Versions

    {                                                          
      "cache": "7.79Mb",
      "path": "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell",
      "python": "/home/vvk/.local/share/dephell/venvs/dephell/bin/python3",
      "version": "0.8.3",
      "versions": {
        "dephell-archive": "0.1.7",
        "dephell-argparse": "0.1.3",
        "dephell-changelogs": "0.0.1",
        "dephell-discover": "0.2.10",
        "dephell-licenses": "0.1.7",
        "dephell-links": "0.1.5",
        "dephell-markers": "1.0.3",
        "dephell-pythons": "0.1.15",
        "dephell-setuptools": "0.2.4",
        "dephell-shells": "0.1.5",
        "dephell-specifier": "0.2.2",
        "dephell-venvs": "0.1.18",
        "dephell-versioning": "0.1.2"
      }
    }
    
    ...
    
    opened by bitphage 0
  • IndexError during `dephell package list` run

    IndexError during `dephell package list` run

    Traceback

    Just tried to run the following command:

    % dephell package list --traceback
    WARNING package not found (package=btrfsutil, url=https://pypi.org/pypi/btrfsutil/json)
    ERROR IndexError: tuple index out of range 
    Traceback (most recent call last):
      File "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell/cli.py", line 66, in main
        result = handler()
      File "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell/commands/package_list.py", line 39, in __call__
        latest=str(releases[0].version),
    IndexError: tuple index out of range
    
    ...
    

    Not sure where it gets btrfsutil from, I don't have it in dependencies.

    Config

    [tool.dephell.main]
    from = {format = "poetry", path = "pyproject.toml"}
    to = {format = "setuppy", path = "setup.py"}
    
    
    [tool.poetry.dependencies]
    python = ">=3.6.1"
    
    [tool.poetry.dev-dependencies]
    pre-commit = "^2.2.0"
    pytest = "^5.4"
    pytest-cov = "^2.7"
    pytest-mock = "^3.1.0"
    
    ...
    

    Versions

    {
      "cache": "7.50Mb",
      "path": "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell",
      "python": "/home/vvk/.local/share/dephell/venvs/dephell/bin/python3",
      "version": "0.8.3",
      "versions": {
        "dephell-archive": "0.1.7",
        "dephell-argparse": "0.1.3",
        "dephell-changelogs": "0.0.1",
        "dephell-discover": "0.2.10",
        "dephell-licenses": "0.1.7",
        "dephell-links": "0.1.5",
        "dephell-markers": "1.0.3",
        "dephell-pythons": "0.1.15",
        "dephell-setuptools": "0.2.4",
        "dephell-shells": "0.1.5",
        "dephell-specifier": "0.2.2",
        "dephell-venvs": "0.1.18",
        "dephell-versioning": "0.1.2"
      }
    }
    
    ...
    
    opened by bitphage 0
  • dephell generates setup.py with README.rst instead od README.md

    dephell generates setup.py with README.rst instead od README.md

    Short description

    I'm converting pyproject to setup.py, and it seems that dephell tries to pick wrong README file.

    Generated setup.py file references README.rst, while I'm having a README.md inside the pyproject.toml

    # -*- coding: utf-8 -*-
    
    # DO NOT EDIT THIS FILE!
    # This file has been autogenerated by dephell <3
    # https://github.com/dephell/dephell
    
    try:
        from setuptools import setup
    except ImportError:
        from distutils.core import setup
    
    import os.path
    
    readme = ''
    here = os.path.abspath(os.path.dirname(__file__))
    readme_path = os.path.join(here, 'README.rst')
    if os.path.exists(readme_path):
        with open(readme_path, 'rb') as stream:
            readme = stream.read().decode('utf8')
    

    Config

    [tool.dephell.main]
    from = {format = "poetry", path = "pyproject.toml"}
    to = {format = "setuppy", path = "setup.py"}
    
    [tool.poetry]
    name = "xxx"
    version = "0.1.0"
    description = "xxx"
    license = "MIT"
    readme = "README.md"
    repository = "https://github.com/xxx"
    
    ...
    

    Versions

    {
      "cache": "6.01Mb",
      "path": "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell",
      "python": "/home/vvk/.local/share/dephell/venvs/dephell/bin/python3",
      "version": "0.8.3",
      "versions": {
        "dephell-archive": "0.1.7",
        "dephell-argparse": "0.1.3",
        "dephell-changelogs": "0.0.1",
        "dephell-discover": "0.2.10",
        "dephell-licenses": "0.1.7",
        "dephell-links": "0.1.5",
        "dephell-markers": "1.0.3",
        "dephell-pythons": "0.1.15",
        "dephell-setuptools": "0.2.4",
        "dephell-shells": "0.1.5",
        "dephell-specifier": "0.2.2",
        "dephell-venvs": "0.1.18",
        "dephell-versioning": "0.1.2"
      }
    }
    
    ...
    
    opened by bitphage 0
  • dephell tries to uninstall system pip during `venv create`

    dephell tries to uninstall system pip during `venv create`

    % dephell venv create --traceback                             
    INFO creating venv for project... (path=/home/vvk/.local/share/dephell/venvs/birdfeeder-PnDk/main)
    INFO chosen python (version=3.7.7, path=/usr/bin/python3)
    ERROR OSError: Looking in links: /tmp/.private/vvk/tmpyxy7kh5a
    Requirement already up-to-date: setuptools in /usr/lib64/python3.7/site-packages (51.0.0)
    Collecting pip
    Installing collected packages: pip
      Found existing installation: pip 19.1
        Uninstalling pip-19.1:
    
    
    ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/pip'
    Consider using the `--user` option or check the permissions.
    
     
    Traceback (most recent call last):
      File "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell/cli.py", line 66, in main
        result = handler()
      File "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell/commands/venv_create.py", line 39, in __call__
        venv.create(python_path=python.path)
      File "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell_venvs/_venv.py", line 130, in create
        builder.create(str(self.path))
      File "/usr/lib/python3.7/venv/__init__.py", line 68, in create
        self._setup_pip(context)
      File "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell_venvs/_builder.py", line 126, in _setup_pip
        raise OSError(output)
    OSError: Looking in links: /tmp/.private/vvk/tmpyxy7kh5a
    Requirement already up-to-date: setuptools in /usr/lib64/python3.7/site-packages (51.0.0)
    Collecting pip
    Installing collected packages: pip
      Found existing installation: pip 19.1
        Uninstalling pip-19.1:
    
    
    ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/pip'
    Consider using the `--user` option or check the permissions.
    
    % dephell self inspect
    {
      "cache": "6.01Mb",
      "path": "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell",
      "python": "/home/vvk/.local/share/dephell/venvs/dephell/bin/python3",
      "version": "0.8.3",
      "versions": {
        "dephell-archive": "0.1.7",
        "dephell-argparse": "0.1.3",
        "dephell-changelogs": "0.0.1",
        "dephell-discover": "0.2.10",
        "dephell-licenses": "0.1.7",
        "dephell-links": "0.1.5",
        "dephell-markers": "1.0.3",
        "dephell-pythons": "0.1.15",
        "dephell-setuptools": "0.2.4",
        "dephell-shells": "0.1.5",
        "dephell-specifier": "0.2.2",
        "dephell-venvs": "0.1.18",
        "dephell-versioning": "0.1.2"
      }
    }
    

    I'm on funtoo linux.

    opened by bitphage 0
  • Cannot install using conda-forge infrastructure

    Cannot install using conda-forge infrastructure

    Short description

    Adding this to conda-forge, but cannot be built successfully. e.g. Linux build complain

    ModuleNotFoundError: No module named 'winreg'

    c.f. https://github.com/conda-forge/staged-recipes/pull/13495

    Output

    Head over to https://github.com/conda-forge/staged-recipes/pull/13495 and see the recipes together with the build logs.

    Expect it to build successfully.

    Steps to reproduce

    Head over to https://github.com/conda-forge/staged-recipes/pull/13495 and see the recipes together with the build logs.

    Traceback

    Head over to https://github.com/conda-forge/staged-recipes/pull/13495 and see the recipes together with the build logs.

    Config

    Head over to https://github.com/conda-forge/staged-recipes/pull/13495 and see the recipes together with the build logs.

    Versions

    Latest.

    opened by ickc 0
  • Multiple version peotry.lock causing TypeError: unhashable type: 'Container'

    Multiple version peotry.lock causing TypeError: unhashable type: 'Container'

    Short description

    Hello,

    When I try to convert a poetry.lock I got TypeError: unhashable type: 'Container' when peotry.lock has multiple versions

    Adding a simple print(subname, subcontent, ) print before the exception show

    aioredis [{'version': '>=0.3.3', 'optional': True, 'markers': 'python_version < "3.7" or python_version < "3.7" and extra == "redis"'}, {'version': '>=1.0.0', 'optional': True, 'markers': 'python_version >= "3.7" or python_version >= "3.7" and extra == "redis"'}]
    

    Python can't convert a subcontent item of container type to a set.

    Maybe check the type before applying set and enforce using for exampe items() to convert it ?

    Output

    $ dephell deps convert --from-format poetrylock --from-path poetry.lock --to requirements.lock --envs main
    ERROR TypeError: unhashable type: 'Container' 
    

    Steps to reproduce

    Add in peotry.lock

    [package.dependencies]
    aiomcache = {version = ">=0.5.2", optional = true, markers = "extra == \"memcached\""}
    aioredis = [
        {version = ">=0.3.3", optional = true, markers = "python_version < \"3.7\" or python_version < \"3.7\" and extra == \"redis\""},
        {version = ">=1.0.0", optional = true, markers = "python_version >= \"3.7\" or python_version >= \"3.7\" and extra == \"redis\""},
    ]
    

    Traceback

    Traceback (most recent call last):
      File "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.8/lib/python3.8/site-packages/dephell/cli.py", line 66, in main
        result = handler()
      File "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.8/lib/python3.8/site-packages/dephell/commands/deps_convert.py", line 45, in __call__
        resolver = loader.load_resolver(path=self.config['from']['path'])
      File "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.8/lib/python3.8/site-packages/dephell/converters/base.py", line 94, in load_resolver
        root = self.load(path=path)
      File "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.8/lib/python3.8/site-packages/dephell/converters/base.py", line 54, in load
        root = self.loads(content=stream.read())
      File "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.8/lib/python3.8/site-packages/dephell/converters/poetrylock.py", line 62, in loads
        deps.extend(self._make_deps(
      File "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.8/lib/python3.8/site-packages/dephell/converters/poetrylock.py", line 167, in _make_deps
        subcontent = ','.join(set(subcontent))
    TypeError: unhashable type: 'Container'
    

    Config

    [tool.poetry.dependencies]
    python = ">=3.6,<=3.9"
    aioredis = "^1.3.1"
    

    Versions

    {
      "cache": "22.47Mb",
      "path": "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.6/lib/python3.6/site-packages/dephell",
      "python": "/home/user/.cache/pypoetry/virtualenvs/hoqfXXHy-py3.6/bin/python",
      "version": "0.8.3",
      "versions": {
        "dephell-archive": "0.1.7",
        "dephell-argparse": "0.1.3",
        "dephell-changelogs": "0.0.1",
        "dephell-discover": "0.2.10",
        "dephell-licenses": "0.1.7",
        "dephell-links": "0.1.5",
        "dephell-markers": "1.0.3",
        "dephell-pythons": "0.1.15",
        "dephell-setuptools": "0.2.4",
        "dephell-shells": "0.1.5",
        "dephell-specifier": "0.2.2",
        "dephell-venvs": "0.1.18",
        "dephell-versioning": "0.1.2"
      }
    }
    
    opened by ahmet2mir 1
Releases(v.0.8.3)
Install and Run Python Applications in Isolated Environments

pipx — Install and Run Python Applications in Isolated Environments Documentation: https://pipxproject.github.io/pipx/ Source Code: https://github.com

null 5.8k Dec 31, 2022
local pypi server (custom packages and auto-mirroring of pypi)

localshop A PyPI server which automatically proxies and mirrors PyPI packages based upon packages requested. It has support for multiple indexes and t

Michael van Tellingen 383 Sep 23, 2022
A PDM plugin that packs your packages into a zipapp

pdm-packer A PDM plugin that packs your packages into a zipapp Requirements pdm-packer requires Python >=3.7 Installation If you have installed PDM wi

Frost Ming 23 Dec 29, 2022
A Poetry plugin for dynamically extracting the package version.

Poetry Version Plugin A Poetry plugin for dynamically extracting the package version. It can read the version from a file __init__.py with: # __init__

Sebastián Ramírez 264 Dec 22, 2022
Python dependency management and packaging made easy.

Poetry: Dependency Management for Python Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right sta

Poetry 23.1k Jan 1, 2023
Python dependency management and packaging made easy.

Poetry: Dependency Management for Python Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right sta

Poetry 23.2k Jan 5, 2023
Simple Library Management made with Python

Installation pip install mysql-connector-python NOTE: You must make a database (library) & and table (books, student) to hold all data. Languange and

SonLyte 10 Oct 21, 2021
Library Management System

Library Management Library Management System How to Use run main.py python file. python3 main.py Links Download Source Code: Click Here My Github Aco

Mohammad Dori 3 Jul 15, 2022
pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward.

pipreqs - Generate requirements.txt file for any project based on imports Installation pip install pipreqs Usage Usage: pipreqs [options] <path>

Vadim Kravcenko 4.8k Dec 31, 2022
The Python Package Index

Warehouse Warehouse is the software that powers PyPI. See our development roadmap, documentation, and architectural overview. Getting Started You can

Python Packaging Authority 3.1k Jan 1, 2023
The Python package installer

pip - The Python Package Installer pip is the package installer for Python. You can use pip to install packages from the Python Package Index and othe

Python Packaging Authority 8.4k Dec 30, 2022
PokerFace is a Python package for various poker tools.

PokerFace is a Python package for various poker tools. The following features are present in PokerFace... Types for cards and their componen

Juho Kim 21 Dec 29, 2022
Example for how to package a Python library based on Cython.

Cython sample module This project is an example of a module that can be built using Cython. It is an upgrade from a similar model developed by Arin Kh

Juan José García Ripoll 4 Aug 28, 2022
If you have stars in your Pipfile and you don't want them, this project is for you!

unstar-pipfile If you have stars in your Pipfile, this project is for you! unstar-pipfile is a tool to scan Pipfile.lock and replace any stars in Pipf

null 2 Jul 26, 2022
Workon - A simple project manager for conda, windows 10 and vscode

WORK ON A simple project manager for conda, windows 10 and vscode Installation p

Jesus Alan Hernandez Galvan 1 Jan 16, 2022
OS-agnostic, system-level binary package manager and ecosystem

Conda is a cross-platform, language-agnostic binary package manager. It is the package manager used by Anaconda installations, but it may be used for

Conda 5.1k Dec 30, 2022
OS-agnostic, system-level binary package manager and ecosystem

Conda is a cross-platform, language-agnostic binary package manager. It is the package manager used by Anaconda installations, but it may be used for

Conda 5.1k Jan 7, 2023
The Fast Cross-Platform Package Manager

The Fast Cross-Platform Package Manager part of mamba-org Package Manager mamba Package Server quetz Package Builder boa mamba Mamba is a reimplementa

Mamba 4k Dec 30, 2022
Conan - The open-source C/C++ package manager

Conan Decentralized, open-source (MIT), C/C++ package manager. Homepage: https://conan.io/ Github: https://github.com/conan-io/conan Docs: https://doc

Conan.io 6.5k Jan 5, 2023