Giter Site home page Giter Site logo

pdm-project / pdm Goto Github PK

View Code? Open in Web Editor NEW
6.6K 6.6K 340.0 11.94 MB

A modern Python package and dependency manager supporting the latest PEP standards

Home Page: https://pdm-project.org

License: MIT License

Python 89.52% Shell 8.71% PowerShell 1.77%
hacktoberfest package-manager packaging pep582 pep621 python workflow

pdm's People

Contributors

abersheeran avatar agoose77 avatar aloxaf avatar baggiponte avatar blueyed avatar cclauss avatar danieleades avatar dependabot[bot] avatar deronnax avatar detachhead avatar doolio avatar drunkwcodes avatar elijahsink avatar frostming avatar hnasar avatar huxuan avatar leemars avatar linw1995 avatar nasyxx avatar noirbizarre avatar p-rogalski avatar pawamoy avatar pohlt avatar pre-commit-ci[bot] avatar sanmai-nl avatar sleiner avatar smileychris avatar tgolsson avatar vvanglro avatar xzmeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdm's Issues

Dependencies get overriden when there are multiple versions of different markers

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

$ pdm add pytest==4.6.*

The package requires:

[
    ...
    'more-itertools>=4.0.0,<6.0.0;python_version<="2.7"',
    'more-itertools>=4.0.0;python_version>"2.7"',
    ...
]

Actual behavior

Lockfile entry:

more-itertools = {marker = "python_version > \"2.7\"", version = ">=4.0.0"}

Expected behavior

Both entries are kept in lockfile.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:

CI error: can't read network drive location

C:/hostedtoolcache/windows/Python/3.8.1/x64/python.exe: can't open file ':\hostedtoolcache\windows\python\3.8.1\x64\lib\site-packages\pdm\_editable_install.py': [Errno 22] Invalid argument

failed to install alembic, ModuleNotFoundError: No module named 'setuptools.extern

Synchronizing: ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉      71/80  00:00:04Command errored out with exit status 1:
 command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-build_r7c39sw/alembic/setup.py'"'"'; __file__='"'"'/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-build_r7c39sw/alembic/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pip-wheel-m9rvp0oi
     cwd: /var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-build_r7c39sw/alembic/
Complete output (5 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/kevin/workspace/backend_epay_restx_pdm/__pypackages__/3.7/lib/setuptools/__init__.py", line 14, in <module>
    from setuptools.extern.six import PY3, string_types
ModuleNotFoundError: No module named 'setuptools.extern'
----------------------------------------
Failed building wheel for alembic
Command errored out with exit status 1:
 command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-build_r7c39sw/alembic/setup.py'"'"'; __file__='"'"'/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-build_r7c39sw/alembic/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
     cwd: /var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-build_r7c39sw/alembic
Complete output (5 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/kevin/workspace/backend_epay_restx_pdm/__pypackages__/3.7/lib/setuptools/__init__.py", line 14, in <module>
    from setuptools.extern.six import PY3, string_types
ModuleNotFoundError: No module named 'setuptools.extern'
----------------------------------------
Failed cleaning build dir for alembic
Retrying (1/1): ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2

python -m pdm list get an error

Environment: Windows 10, Python 3.7

When the library is empty, the following error occurs during python -m pdm list:

C:\Users\dusai>python -m pdm add cowsay
Adding packages to default dependencies: cowsay
Traceback (most recent call last):
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\dusai\AppData\Roaming\Python\Python37\site-packages\pdm\__main__.py", line 4, in <module>
    cli.main()
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "C:\Users\dusai\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\dusai\AppData\Roaming\Python\Python37\site-packages\pdm\cli\commands.py", line 161, in add
    actions.do_add(project, dev, section, sync, save, strategy, editables, packages)
  File "C:\Users\dusai\AppData\Roaming\Python\Python37\site-packages\pdm\cli\actions.py", line 175, in do_add
    project.add_dependencies(requirements)
  File "C:\Users\dusai\AppData\Roaming\Python\Python37\site-packages\pdm\project\core.py", line 261, in add_dependencies
    deps = self.tool_settings["dependencies"]
  File "C:\Users\dusai\AppData\Roaming\Python\Python37\site-packages\pdm\project\core.py", line 35, in getter
    _cache = func(self, *args, **kwargs)
  File "C:\Users\dusai\AppData\Roaming\Python\Python37\site-packages\pdm\project\core.py", line 91, in tool_settings
    data = data.setdefault(sec, {})
AttributeError: 'NoneType' object has no attribute 'setdefault'

When the library has any sitepackage, the error disappears:

C:\Users\dusai>python -m pdm list
pdmtest  1.0.0 (-e c:\users\dusai)
cowsay   2.0.3

😆😆😆It's a great tool. Keep going!😆😆😆

Design a plug-in system

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Some hook points:

  • Ability to modify root parser
  • Ability to add subcommands
  • Ability to add config items
  • Ability to change project behavior
  • Ability to change install behavior
  • Ability to change resolve behavior
    • change repository
    • change provider
    • change resolver
    • change reporter

WheelBuildError when resolving functools32

Traceback (most recent call last):
  File "D:\Workspace\pdm\__pypackages__\3.8\Scripts\pdm-script.py", line 12, in <module>
    load_entry_point('pdm', 'console_scripts', 'pdm')()
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "D:/Workspace/pdm/__pypackages__/3.8/lib\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "d:\workspace\pdm\pdm\cli\commands.py", line 97, in install
    actions.do_lock(project)
  File "d:\workspace\pdm\pdm\cli\actions.py", line 95, in do_lock
    mapping, dependencies, summaries = resolve(
  File "d:\workspace\pdm\pdm\resolver\__init__.py", line 119, in resolve
    state = resolver.resolve({k: reqs.values() for k, reqs in requirements.items()})
  File "d:\workspace\pdm\pdm\resolver\resolvers.py", line 298, in resolve
    resolution.resolve(requirements, max_rounds=max_rounds)
  File "d:\workspace\pdm\pdm\resolver\resolvers.py", line 249, in resolve
    self._pin_criteria()
  File "d:\workspace\pdm\pdm\resolver\resolvers.py", line 216, in _pin_criteria
    dependencies = self._p.get_dependencies(candidate)
  File "d:\workspace\pdm\pdm\resolver\providers.py", line 48, in get_dependencies
    deps, requires_python, summary = self.repository.get_dependencies(candidate)
  File "d:\workspace\pdm\pdm\models\repositories.py", line 54, in get_dependencies
    requirements, requires_python, summary = getter(candidate)
  File "d:\workspace\pdm\pdm\models\repositories.py", line 28, in wrapper
    result = func(self, candidate)
  File "d:\workspace\pdm\pdm\models\repositories.py", line 114, in _get_dependencies_from_metadata
    deps = candidate.get_dependencies_from_metadata()
  File "d:\workspace\pdm\pdm\models\candidates.py", line 131, in get_dependencies_from_metadata
    metadata = self.get_metadata()
  File "d:\workspace\pdm\pdm\models\candidates.py", line 88, in get_metadata
    built = self.environment.build(ireq, self.hashes)
  File "d:\workspace\pdm\pdm\models\environment.py", line 239, in build
    return builder.build(**kwargs)
  File "d:\workspace\pdm\pdm\builders\wheel.py", line 38, in build
    return self._build_other(build_dir, **kwargs)
  File "d:\workspace\pdm\pdm\builders\wheel.py", line 60, in _build_other
    raise WheelBuildError(str(self.ireq))
pdm.exceptions.WheelBuildError: functools32; python_version < "3.2" from https://files.pythonhosted.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz#sha256=f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d

Reuse pins when locking in pdm install command

Is your feature request related to a problem? Please describe.

When lockfile hash mismatches, a full lock process is performed, just to update that hash.

Describe the solution you'd like

Reuse pins when possible

Hashes are missing for some packages

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

$ pdm init
$ pdm add numpy

Actual behavior

No hash for numpy

Expected behavior

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:
Python Interpreter: /Users/fming/Library/PythonUp/cmd/python3.7 (3.7.5)
Project Root:       /Users/fming/wkspace/github/pdm-test
{
  "implementation_name": "cpython",
  "implementation_version": "3.7.5",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "19.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64",
  "python_full_version": "3.7.5",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.7",
  "sys_platform": "darwin"
}

Command to clear caches

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

error: invalid command 'bdist_wheel'

OS环境:macOS
python版本:3.7

➜  backend_restx_pdm git:(release.001) ✗ pdm update -vv
⠋ Resolving blinkerCommand errored out with exit status 1:
 command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-buildla663h3c/blinker/setup.py'"'"'; __file__='"'"'/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-buildla663h3c/blinker/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pip-wheel-781gfl3t
     cwd: /var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pdm-buildla663h3c/blinker/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for blinker
Traceback (most recent call last):
  File "/usr/local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/pdm/core.py", line 68, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pdm/core.py", line 100, in main
    raise err.with_traceback(traceback)
  File "/usr/local/lib/python3.7/site-packages/pdm/core.py", line 96, in main
    f(options.project, options)
  File "/usr/local/lib/python3.7/site-packages/pdm/cli/commands/update.py", line 36, in handle
    packages=options.packages,
  File "/usr/local/lib/python3.7/site-packages/pdm/cli/actions.py", line 189, in do_update
    do_lock(project)
  File "/usr/local/lib/python3.7/site-packages/pdm/cli/actions.py", line 56, in do_lock
    resolver, requirements, project.environment.python_requires
  File "/usr/local/lib/python3.7/site-packages/pdm/resolver/__init__.py", line 119, in resolve
    state = resolver.resolve({k: reqs.values() for k, reqs in requirements.items()})
  File "/usr/local/lib/python3.7/site-packages/pdm/resolver/resolvers.py", line 298, in resolve
    resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/local/lib/python3.7/site-packages/pdm/resolver/resolvers.py", line 249, in resolve
    self._pin_criteria()
  File "/usr/local/lib/python3.7/site-packages/pdm/resolver/resolvers.py", line 216, in _pin_criteria
    dependencies = self._p.get_dependencies(candidate)
  File "/usr/local/lib/python3.7/site-packages/pdm/resolver/providers.py", line 48, in get_dependencies
    deps, requires_python, summary = self.repository.get_dependencies(candidate)
  File "/usr/local/lib/python3.7/site-packages/pdm/models/repositories.py", line 61, in get_dependencies
    requirements, requires_python, summary = getter(candidate)
  File "/usr/local/lib/python3.7/site-packages/pdm/models/repositories.py", line 27, in wrapper
    result = func(self, candidate)
  File "/usr/local/lib/python3.7/site-packages/pdm/models/repositories.py", line 130, in _get_dependencies_from_metadata
    deps = candidate.get_dependencies_from_metadata()
  File "/usr/local/lib/python3.7/site-packages/pdm/models/candidates.py", line 183, in get_dependencies_from_metadata
    metadata = self.get_metadata()
  File "/usr/local/lib/python3.7/site-packages/pdm/models/candidates.py", line 138, in get_metadata
    built = self.environment.build(ireq, self.hashes, allow_all_wheels)
  File "/usr/local/lib/python3.7/site-packages/pdm/models/environment.py", line 315, in build
    return builder.build(**kwargs)
  File "/usr/local/lib/python3.7/site-packages/pdm/builders/wheel.py", line 37, in build
    return self._build_other(build_dir, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pdm/builders/wheel.py", line 56, in _build_other
    raise WheelBuildError(str(self.ireq))
pdm.exceptions.WheelBuildError: blinker==1.4 from http://mirrors.aliyun.com/pypi/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz#md5=8b3722381f83c2813c52de3016b68d33

Use project local python to build wheel

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

  1. pdm use 2.7
  2. pdm add functools32

Actual behavior

Build error since the wheel is generated under Python 3

Expected behavior

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:

Malformed wheel

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

To build a wheel

$ pdm build

Actual behavior

wheel RECORD is malformed:

  1. The path should be / separated relative path.
  2. The hash sum digest kind is missing sha256=

Expected behavior

The wheel can't be installed correctly.

Environment Information

pdm version: master

# Paste the output of `pdm info && pdm info --env` below:

Feature notes

  • Requirement specification
    • Multiple requirements
    • Exclude requirements
    • git, svn, hg, bzr keys
  • pdm add
    • Single requirement.
    • Multiple requirements in quotes: pdm add "requests>=2.20.0; os_name=='nt'" "-e https://github.com/pallets/click.git@master#egg=click".
  • Dependency reader
    • Wheel file: read from metadata
    • Local dir: read from project files
      • setup.py, setup.cfg
      • pyproject.toml
    • cached

Error: No version available for nautc

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

The nautc package is here:

https://pypi.org/project/nautc/

https://github.com/nasyxx/nautc.git

Steps to reproduce

mkdir temp && cd temp
pdm init
pdm add nautc

Actual behavior

Failed to add package nautc.

λ pdm add -v nautc
Adding packages to default dependencies: nautc
Error: No version available for nautc.
Traceback (most recent call last):
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/cli/commands.py", line 205, in add
    actions.do_add(project, dev, section, sync, save, strategy, editables, packages)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/cli/actions.py", line 218, in do_add
    resolved = do_lock(project, strategy, tracked_names, all_dependencies)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/cli/actions.py", line 135, in do_lock
    mapping, dependencies, summaries = resolve(
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/__init__.py", line 119, in resolve
    state = resolver.resolve({k: reqs.values() for k, reqs in requirements.items()})
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 298, in resolve
    resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 237, in resolve
    self._contribute_to_criteria(name, requirement, parent=f"__{key}__")
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 124, in _contribute_to_criteria
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 51, in from_requirement
    raise NoVersionsAvailable(requirement, parent)
pdm.exceptions.NoVersionsAvailable: No version available for nautc.

Expected behavior

It should successfully add package nautc.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:
Python Interpreter: /Users/Nasy/.pyenv/versions/3.8.1/bin/python (3.8.1)
Project Root:       /Users/Nasy/temp/tp
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "19.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64",
  "python_full_version": "3.8.1",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.8",
  "sys_platform": "darwin"
}

PDM Clobbering SSH Username

A requirement of the form git@server:repo.git gets translated into ssh://server/repo.git, dropping the git@ username component of the url. This then fails cloning if the server requires that git username (as GitHub does).

The issue is this line (specifically self.url[4:]) that slices out the username when constructing the ssh:// url. You can bypass this errant special casing with an explicit ssh:// schema (e.g. ssh://git@server/repo.git).

Should check user input when init project.

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

❯ pdm init -v
Creating a pyproject.toml for PDM...
Please enter the Python interpreter to use:
0. /usr/bin/python3 (3.8.2)
1. /usr/bin/python2 (2.7.17)
Please select: [0]: 0
Using Python interpreter: /usr/bin/python3 (3.8.2)
Project name [test]:
Project version [0.0.0]:
License(SPDX name) [MIT]:
Author name [Aloxaf]:
Author email [[email protected]]:
Python requires('*' to allow any) [>=3.8]: 3.6
Changes are written to pyproject.toml.
❯ pdm add python-telegram-bot -v
Adding packages to default dependencies: python-telegram-bot
Traceback (most recent call last):
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pip/_vendor/packaging/specifiers.py", line 663, in __init__
    parsed.add(Specifier(specifier))
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pip/_vendor/packaging/specifiers.py", line 111, in __init__
    raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))
pip._vendor.packaging.specifiers.InvalidSpecifier: Invalid specifier: '3.6'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aloxaf/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 68, in __call__
    return self.main(*args, **kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 100, in main
    raise err.with_traceback(traceback)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 96, in main
    f(options.project, options)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/commands/add.py", line 35, in handle
    actions.do_add(
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/actions.py", line 136, in do_add
    resolved = do_lock(project, strategy, tracked_names, all_dependencies)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/actions.py", line 47, in do_lock
    provider = project.get_provider(strategy, tracked_names)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/project/core.py", line 220, in get_provider
    repository = self.get_repository(cls=self.core.repository_class)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/project/core.py", line 209, in get_repository
    return cls(sources, self.environment)
  File "/usr/lib/python3.8/functools.py", line 966, in __get__
    val = self.func(instance)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/project/core.py", line 144, in environment
    return Environment(self)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/environment.py", line 85, in __init__
    self.python_requires = project.python_requires
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/project/core.py", line 148, in python_requires
    return PySpecSet(self.tool_settings.get("python_requires", ""))
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/specifiers.py", line 94, in __init__
    super().__init__(version_str)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pip/_vendor/packaging/specifiers.py", line 665, in __init__
    parsed.add(LegacySpecifier(specifier))
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pip/_vendor/packaging/specifiers.py", line 111, in __init__
    raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))
pip._vendor.packaging.specifiers.InvalidSpecifier: Invalid specifier: '3.6'

Actual behavior

Tell me "3.6" is an invalid specifier after init project.

Expected behavior

Tell me "3.6" is an invalid specifier when init project.

Environment Information

pdm version:

❯ pdm info && pdm info --env
Python Interpreter: /usr/bin/python3 (3.8.2)
Project Root:       /tmp/test
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.2",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.5.11-zen1-1-zen",
  "platform_system": "Linux",
  "platform_version": "#1 ZEN SMP PREEMPT Sun, 22 Mar 2020 16:33:18 +0000",
  "python_full_version": "3.8.2",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}

markers are not merged when there are multiple sources

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

dependencies:

[tool.pdm.dependencies]
pytest="==4.6.*"
more-itertools=">=4.0.0,<6.0.0"
pdm lock

Actual behavior

more-itertools has markers.

Expected behavior

more-itertools has no marker.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:

py2 wheels are preferred when the interpreter is Py3

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

pdm init
pdm use 3.7
pdm add futures

Actual behavior

futures-3.1.1-py2-none-any.whl is installed

Expected behavior

futures-3.1.1-py3-none-any.whl is installed

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:
Python Interpreter: /usr/local/bin/python3.7m (3.7.6)
Project Root:       /Users/fming/wkspace/github/pdm-test
{
  "implementation_name": "cpython",
  "implementation_version": "3.7.6",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "19.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64",
  "python_full_version": "3.7.6",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.7",
  "sys_platform": "darwin"
}

Python versions can be merged

python_version < \"3.4\" and python_version >= \"2.7\" and python_version not in \"3.0, 3.1, 3.2, 3.3\"

Expected:
python_version >= "2.7" and python_version < "3.0"

几个报错的汇总

环境:树梅派

问题一

安装 PDM 后,运行 pip3 报错

Traceback (most recent call last):
  File "/usr/bin/pip3", line 11, in <module>
    sys.exit(main())
TypeError: 'module' object is not callable

原因可能是 pdm 导致环境中有 2个重复的 pip3

运行python3 -m pip uninstall pip 卸载一个 pip3 后, pip3 恢复正常。

问题二

$ python3 -m pdm add cowsay
Adding packages to default dependencies: cowsay
Changes are written to pyproject.toml.
  Finish resolvingResolution success
Changes are written to pdm.lock.
Installing cowsay 2.0.3...
Installing pdmDemo 0.0.0...
AttributeError: 'NoneType' object has no attribute 'group'

虽然报错,但是 pdm 可以正常运行 add,run 指令

问题三

python3 -m pdm remove cowsay
Removing packages from default dependencies: cowsay
Changes are written to pyproject.toml.
  Finish resolvingResolution success
Changes are written to pdm.lock.
NonExistentKey: 'Key "package" does not exist.'

如果局部环境中只有一个包,并且执行 remove 将此包删除,则会导致 pdm.lock 中无 [package] 索引,因此 add remove update 指令均报错:

$ python3 -m pdm list
Package Version
------- -------
cowsay  2.0.3 

此时可以正常 run :
$ python3 -m pdm run cowsay moo
  ___
< moo >
  ===
        \
         \
           ^__^                             
           (oo)\_______                   
           (__)\       )\/\             
               ||----w |           
               ||     ||  

问题四

运行 $ python setup_dev.py 失败,报错如下:

...
Successfully installed pip-20.0.2 pip-shims-0.5.0
Setup project for development...
Installing cursor 1.3.4...
HashMismatch: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    unknown package:
        Expected sha256 33f279a17789c04efd27a92501a0dad62bb011f8a4cdff93867c798d26508940
             Got        84e0405a5c7c8b5135e54cc7fd38e9afa999389830cb64a80e8f7814709afb97

Traceback (most recent call last):
  File "setup_dev.py", line 55, in <module>
    main()
  File "setup_dev.py", line 35, in main
    subprocess.check_call([venv_python.as_posix(), "-m", "pdm", "install", "-d"])
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['env/bin/python', '-m', 'pdm', 'install', '-d']' returned non-zero exit status 1.

树梅派 pipenv 环境中出现此问题。

Can't add package: WheelBuildError

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

❯ pdm init -v
Creating a pyproject.toml for PDM...
Please enter the Python interpreter to use:
0. /usr/bin/python3 (3.8.2)
1. /usr/bin/python2 (2.7.17)
Please select: [0]: 0
Using Python interpreter: /usr/bin/python3 (3.8.2)
Project name [test]:
Project version [0.0.0]:
License(SPDX name) [MIT]:
Author name [Aloxaf]:
Author email [[email protected]]:
Python requires('*' to allow any) [>=3.8]: >=3.6
Changes are written to pyproject.toml.
❯ pdm add python-telegram-bot -v
Adding packages to default dependencies: python-telegram-bot
⠹ Resolved: decorator 4.4.2See /tmp/pdm-lock-_mj6r4jp.log for detailed debug log.
Traceback (most recent call last):
  File "/home/aloxaf/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 68, in __call__
    return self.main(*args, **kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 100, in main
    raise err.with_traceback(traceback)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 96, in main
    f(options.project, options)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/commands/add.py", line 35, in handle
    actions.do_add(
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/actions.py", line 136, in do_add
    resolved = do_lock(project, strategy, tracked_names, all_dependencies)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/actions.py", line 55, in do_lock
    mapping, dependencies, summaries = resolve(
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/__init__.py", line 119, in resolve
    state = resolver.resolve({k: reqs.values() for k, reqs in requirements.items()})
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 297, in resolve
    resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 248, in resolve
    self._pin_criteria()
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 215, in _pin_criteria
    dependencies = self._p.get_dependencies(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/providers.py", line 127, in get_dependencies
    dependencies = super().get_dependencies(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/providers.py", line 48, in get_dependencies
    deps, requires_python, summary = self.repository.get_dependencies(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/repositories.py", line 61, in get_dependencies
    requirements, requires_python, summary = getter(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/repositories.py", line 27, in wrapper
    result = func(self, candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/repositories.py", line 130, in _get_dependencies_from_metadata
    deps = candidate.get_dependencies_from_metadata()
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/candidates.py", line 183, in get_dependencies_from_metadata
    metadata = self.get_metadata()
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/candidates.py", line 138, in get_metadata
    built = self.environment.build(ireq, self.hashes, allow_all_wheels)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/environment.py", line 315, in build
    return builder.build(**kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/builders/wheel.py", line 37, in build
    return self._build_other(build_dir, **kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/builders/wheel.py", line 56, in _build_other
    raise WheelBuildError(str(self.ireq))
pdm.exceptions.WheelBuildError: future>=0.16.0 from https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz#sha256=b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d
❯ cat /tmp/pdm-lock-_mj6r4jp.log
========Start resolving requirements========
        python-telegram-bot
Package constraints:
        python-telegram-bot     <= __default__
Found candidate python-telegram-bot 12.4.2
========Ending round 0========
New pins:
        python-telegram-bot     12.4.2
Package constraints:
        certifi <= python-telegram-bot
Found candidate certifi 2019.11.28
Package constraints:
        cryptography    <= python-telegram-bot
Found candidate cryptography 2.8
Package constraints:
        decorator>=4.4.0        <= python-telegram-bot
Found candidate decorator 4.4.2
Command errored out with exit status 1:
 command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pdm-buildtkdqao3m/future/setup.py'"'"'; __file__='"'"'/tmp/pdm-buildtkdqao3m/future/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w_2dfs7s
     cwd: /tmp/pdm-buildtkdqao3m/future/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for future

Actual behavior

Raise a WheelBuildError

Expected behavior

Add it without any error.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:
❯ pdm info && pdm info --env
Python Interpreter: /usr/bin/python3 (3.8.2)
Project Root:       /tmp/test
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.2",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.5.11-zen1-1-zen",
  "platform_system": "Linux",
  "platform_version": "#1 ZEN SMP PREEMPT Sun, 22 Mar 2020 16:33:18 +0000",
  "python_full_version": "3.8.2",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}

Can't handle abnormal python markers

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

python_requires = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
pdm add pytest

importlib-metadata has requirement: pathlib2; python_version=='3.4.*' or python_version < '3'

Expected behavior

locked and installed correctly

Environment Information

pdm version: master

# Paste the output of `pdm info && pdm info --env` below:

Resolution result is wrong for docutils

Reproduce

pdm add "docutils<0.16,>=0.10"

Expected

docutils==0.15.2

Actual

[[package]]
name = "docutils"
sections = ["default"]
version = "0.15.post1"
marker = "python_version >= \"2.6\" and python_version not in \"3.0, 3.1, 3.2\""
summary = "Docutils -- Python Documentation Utilities"

[metadata]
"docutils 0.15.post1" = [
    {file = "docutils-0.15.post1-py2-none-any.whl", hash = "sha256:ba4584f9107571ced0d2c7f56a5499c696215ba90797849c92d395979da68521"},
]

[root]
content_hash = "md5:a34a70283dc33a99743b6086bef07c0f"
meta_version = "0.0.1"

Installation failed: gevent, FileNotFoundError: [Errno 2] No such file or directory

[ERROR]
Installation failed: gevent
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/pdm/installers.py", line 445, in install_candidate
    installer.install(can)
  File "/usr/local/lib/python3.7/site-packages/pdm/installers.py", line 286, in install
    candidate.get_metadata(allow_all_wheels=False)
  File "/usr/local/lib/python3.7/site-packages/pdm/models/candidates.py", line 138, in get_metadata
    built = self.environment.build(ireq, self.hashes, allow_all_wheels)
  File "/usr/local/lib/python3.7/site-packages/pdm/models/environment.py", line 301, in build
    session=finder.session,
  File "/usr/local/lib/python3.7/site-packages/pip_shims/compat.py", line 754, in shim_unpack
    return unpack_fn(**unpack_kwargs)  # type: ignore
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url
    hashes=hashes,
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 159, in unpack_http_url
    link, downloader, temp_dir.path, hashes
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 307, in _download_http_url
    hashes.check_against_path(file_path)
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/utils/hashes.py", line 102, in check_against_path
    with open(path, 'rb') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/bv/vvf44mtd4t54p5c4d424jpfh0000gn/T/pip-unpack-97_apydq/gevent-1.4.0-cp37-cp37m-macosx_10_9_x86_64.whl'

Integrate with pyenv

Describe the solution you'd like

Use the pyenv interpreter if pyenv is installed.

Can't install black

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

$ pdm add black

Actual behavior

Installing black 19.10b0...
Traceback (most recent call last):
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/bin/pdm", line 12, in <module>
    load_entry_point('pdm', 'console_scripts', 'pdm')()
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/fming/wkspace/github/pdm/pdm/cli/commands.py", line 93, in main
    raise err.with_traceback(traceback)
  File "/Users/fming/wkspace/github/pdm/pdm/cli/commands.py", line 89, in main
    super().main(*args, **kwargs)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/fming/wkspace/github/pdm/pdm/cli/commands.py", line 172, in sync
    actions.do_sync(project, sections, dev, default, dry_run, clean)
  File "/Users/fming/wkspace/github/pdm/pdm/cli/actions.py", line 173, in do_sync
    handler.synchronize(clean=clean, dry_run=dry_run)
  File "/Users/fming/wkspace/github/pdm/pdm/installers.py", line 184, in synchronize
    self.install_candidates(
  File "/Users/fming/wkspace/github/pdm/pdm/installers.py", line 153, in install_candidates
    installer.install(can)
  File "/Users/fming/wkspace/github/pdm/pdm/installers.py", line 51, in install
    self.install_wheel(candidate.wheel)
  File "/Users/fming/wkspace/github/pdm/pdm/installers.py", line 61, in install_wheel
    wheel.install(paths, scripts)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/distlib/wheel.py", line 649, in install
    filenames = maker.make(script)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/distlib/scripts.py", line 400, in make
    entry = get_export_entry(specification)
  File "/Users/fming/wkspace/github/pdm/__pypackages__/3.8/lib/distlib/util.py", line 731, in get_export_entry
    raise DistlibException("Invalid specification "
distlib.DistlibException: Invalid specification 'blackd = blackd:patched_main ['d']'

Expected behavior

Black is installed correctly.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:

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.