Commit 92d0eddf by Sébastien Eustace

Merge branch 'master' into develop

parents 49ed4d32 3240acce
...@@ -7,6 +7,14 @@ ...@@ -7,6 +7,14 @@
- Added a new, more efficient dependency resolver. - Added a new, more efficient dependency resolver.
## [0.9.1] - 2018-05-18
### Fixed
- Fixed handling of package names with dots. (Thanks to [bertjwregeer](https://github.com/bertjwregeer))
- Fixed path dependencies being resolved from the current path instead of the `pyproject.toml` file. (Thanks to [radix](https://github.com/radix))
## [0.9.0] - 2018-05-07 ## [0.9.0] - 2018-05-07
### Added ### Added
...@@ -310,7 +318,8 @@ Initial release ...@@ -310,7 +318,8 @@ Initial release
[Unreleased]: https://github.com/sdispater/poetry/compare/0.9.0...master [Unreleased]: https://github.com/sdispater/poetry/compare/0.9.1...master
[0.9.1]: https://github.com/sdispater/poetry/releases/tag/0.9.1
[0.9.0]: https://github.com/sdispater/poetry/releases/tag/0.9.0 [0.9.0]: https://github.com/sdispater/poetry/releases/tag/0.9.0
[0.8.6]: https://github.com/sdispater/poetry/releases/tag/0.8.6 [0.8.6]: https://github.com/sdispater/poetry/releases/tag/0.8.6
[0.8.5]: https://github.com/sdispater/poetry/releases/tag/0.8.5 [0.8.5]: https://github.com/sdispater/poetry/releases/tag/0.8.5
......
...@@ -96,9 +96,11 @@ fpath+=~/.zfunc ...@@ -96,9 +96,11 @@ fpath+=~/.zfunc
## Introduction ## Introduction
`poetry` is a tool to handle dependencies installation, building and packaging of Python packages. `poetry` is a tool to handle dependency installation as well as building and packaging of Python packages.
It only needs one file to do all of that: the new, [standardized](https://www.python.org/dev/peps/pep-0518/) `pyproject.toml`. It only needs one file to do all of that: the new, [standardized](https://www.python.org/dev/peps/pep-0518/) `pyproject.toml`.
In other words, poetry uses `pyproject.toml` to replace `setup.py`, `requirements.txt`, `setup.cfg`, `MANIFEST.in` and the newly added `Pipfile`.
```toml ```toml
[tool.poetry] [tool.poetry]
name = "my-package" name = "my-package"
...@@ -155,7 +157,7 @@ So, `poetry` can be installed globally and used everywhere. ...@@ -155,7 +157,7 @@ So, `poetry` can be installed globally and used everywhere.
## Why? ## Why?
Packaging system and dependency management in Python is rather convoluted and hard to understand for newcomers. Packaging systems and dependency management in Python are rather convoluted and hard to understand for newcomers.
Even for seasoned developers it might be cumbersome at times to create all files needed in a Python project: `setup.py`, Even for seasoned developers it might be cumbersome at times to create all files needed in a Python project: `setup.py`,
`requirements.txt`, `setup.cfg`, `MANIFEST.in` and the newly added `Pipfile`. `requirements.txt`, `setup.cfg`, `MANIFEST.in` and the newly added `Pipfile`.
...@@ -164,13 +166,13 @@ dependency management, packaging and publishing. ...@@ -164,13 +166,13 @@ dependency management, packaging and publishing.
It takes inspiration in tools that exist in other languages, like `composer` (PHP) or `cargo` (Rust). It takes inspiration in tools that exist in other languages, like `composer` (PHP) or `cargo` (Rust).
And, finally, there is no reliable tool to properly resolves dependencies in Python, so I started `poetry` And, finally, there is no reliable tool to properly resolve dependencies in Python, so I started `poetry`
to bring an exhaustive dependency resolver to the Python community. to bring an exhaustive dependency resolver to the Python community.
### What about Pipenv? ### What about Pipenv?
In short: I do not like the CLI it provides, or some of the decisions made, In short: I do not like the CLI it provides, or some of the decisions made,
and I think we can do a better and more intuitive one. Here are a few things and I think we can make a better and more intuitive one. Here are a few things
that I don't like. that I don't like.
#### Dependency resolution #### Dependency resolution
...@@ -697,7 +699,7 @@ This section describe the scripts or executable that will be installed when inst ...@@ -697,7 +699,7 @@ This section describe the scripts or executable that will be installed when inst
poetry = 'poetry:console.run' poetry = 'poetry:console.run'
``` ```
Here, we will have the `poetry` script installed which will execute `console.run` in the `poetry` package. After installing a package with the above toml, `poetry` will be a global command available from the command line that will execute `console.run` in the `poetry` package.
### `extras` ### `extras`
...@@ -733,7 +735,7 @@ poetry install -E mysql -E pgsql ...@@ -733,7 +735,7 @@ poetry install -E mysql -E pgsql
### `plugins` ### `plugins`
Poetry supports arbitrary plugins wich work similarly to Poetry supports arbitrary plugins which work similarly to
[setuptools entry points](http://setuptools.readthedocs.io/en/latest/setuptools.html). [setuptools entry points](http://setuptools.readthedocs.io/en/latest/setuptools.html).
To match the example in the setuptools documentation, you would use the following: To match the example in the setuptools documentation, you would use the following:
......
...@@ -7,7 +7,7 @@ from typing import Union ...@@ -7,7 +7,7 @@ from typing import Union
from poetry.version import Version from poetry.version import Version
_canonicalize_regex = re.compile('[-_.]+') _canonicalize_regex = re.compile('[-_]+')
def canonicalize_name(name): # type: (str) -> str def canonicalize_name(name): # type: (str) -> str
...@@ -15,7 +15,7 @@ def canonicalize_name(name): # type: (str) -> str ...@@ -15,7 +15,7 @@ def canonicalize_name(name): # type: (str) -> str
def module_name(name): # type: (str) -> str def module_name(name): # type: (str) -> str
return canonicalize_name(name).replace('-', '_') return canonicalize_name(name).replace('.', '_').replace('-', '_')
def normalize_version(version): # type: (str) -> str def normalize_version(version): # type: (str) -> str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment