diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 88a1f4d..44dec8d 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -34,7 +34,7 @@ jobs: test: runs-on: ubuntu-latest - needs: Install + needs: install strategy: matrix: python-version: [3.8] @@ -47,7 +47,7 @@ jobs: format: runs-on: ubuntu-latest - needs: Install + needs: install strategy: matrix: python-version: [3.8] diff --git a/README.md b/README.md index 8dde1f1..3547b8c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Conan-for-Poetry -A plugin for Poetry that enables integrated Conan support. +# Synodic-Poetry +A Plugin for Poetry that enables a transparent Conan and CMake workflow. diff --git a/conan_for_poetry/cli.py b/conan_for_poetry/cli.py deleted file mode 100644 index 66cca38..0000000 --- a/conan_for_poetry/cli.py +++ /dev/null @@ -1,94 +0,0 @@ -# TODO: Remove CLI interface once poetry has plugin support - -import click -import sys -import subprocess - -from conan_for_poetry.plugin import ConanPlugin - - -@click.group() -def entrypoint(): - command = ['poetry'] - command.extend(sys.argv[1:]) - subprocess.run(command) - - -@entrypoint.command() -def new(): - ConanPlugin().poetry_new() - - -@entrypoint.command() -def init(): - ConanPlugin().poetry_init() - - -@entrypoint.command() -def install(): - ConanPlugin().poetry_install() - - -@entrypoint.command() -def update(): - ConanPlugin().poetry_update() - - -@entrypoint.command() -def add(): - ConanPlugin().poetry_add() - - -@entrypoint.command() -def remove(): - ConanPlugin().poetry_remove() - - -@entrypoint.command() -def show(): - ConanPlugin().poetry_show() - - -@entrypoint.command() -def build(): - ConanPlugin().poetry_build() - - -@entrypoint.command() -def publish(): - ConanPlugin().poetry_publish() - - -@entrypoint.command() -def config(): - ConanPlugin().poetry_config() - - -@entrypoint.command() -def check(): - ConanPlugin().poetry_check() - - -@entrypoint.command() -def search(): - ConanPlugin().poetry_search() - - -@entrypoint.command() -def lock(): - ConanPlugin().poetry_lock() - - -@entrypoint.command() -def version(): - ConanPlugin().poetry_version() - - -@entrypoint.command() -def export(): - ConanPlugin().poetry_export() - - -@entrypoint.command() -def env(): - ConanPlugin().poetry_env() diff --git a/poetry.lock b/poetry.lock index 78262ad..afd606c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -130,7 +130,7 @@ version = "0.7.6" clikit = ">=0.4.0,<0.5.0" [[package]] -category = "main" +category = "dev" description = "Composable command line interface toolkit" name = "click" optional = false @@ -817,7 +817,7 @@ python-versions = "*" version = "0.5.1" [metadata] -content-hash = "627b48d699a5ec5365a1dbddab165abb4c05dccd23da785aca9a618f7d65a720" +content-hash = "98b14d016538f09da5cc433f051542f736b5b71112cb67fc8e0e9ab7e4ae4538" python-versions = "^3.8" [metadata.files] diff --git a/pyproject.toml b/pyproject.toml index 5b551a2..1c621ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] -name = "conan-for-poetry" +name = "synodic-poetry" version = "0.1.0" -description = " A Poetry plugin integrating Conan support." +description = " A Poetry plugin integrating a transparent Conan and CMake workflow." license = "MIT" @@ -11,15 +11,14 @@ authors = [ readme = "README.md" -repository = "https://github.com/Synodic-Software/Conan-for-Poetry" -homepage = "https://github.com/Synodic-Software/Conan-for-Poetry" +repository = "https://github.com/Synodic-Software/Synodic-Poetry" +homepage = "https://github.com/Synodic-Software/Synodic-Poetry" [tool.poetry.dependencies] python = "^3.8" poetry = "^1.0" conan = "^1.21" -click = "^7.0" toml = "^0.10" @@ -31,11 +30,6 @@ path = "^13.1.0" black = {version = "^19.10b0", allow-prereleases = true} -#TODO: Remove CLI interface once poetry has plugin support -[tool.poetry.scripts] -conan-poetry = "conan_for_poetry.cli:entrypoint" - - [build-system] requires = ["poetry>=1.0.0"] build-backend = "poetry.masonry.api" diff --git a/conan_for_poetry/__init__.py b/synodic_poetry/__init__.py similarity index 100% rename from conan_for_poetry/__init__.py rename to synodic_poetry/__init__.py diff --git a/conan_for_poetry/plugin.py b/synodic_poetry/plugin.py similarity index 99% rename from conan_for_poetry/plugin.py rename to synodic_poetry/plugin.py index 053db13..1dab24b 100644 --- a/conan_for_poetry/plugin.py +++ b/synodic_poetry/plugin.py @@ -4,7 +4,7 @@ from conans.client.conan_api import ConanAPIV1 as _ConanAPI -class ConanPlugin: +class SynodicPlugin: data = None diff --git a/tests/integration/test_cli.py b/tests/integration/test_cli.py deleted file mode 100644 index d64d64f..0000000 --- a/tests/integration/test_cli.py +++ /dev/null @@ -1,10 +0,0 @@ -from conan_for_poetry.cli import entrypoint -from click.testing import CliRunner - - -class TestCLI(): - - def test_cli_check(self): - runner = CliRunner() - result = runner.invoke(entrypoint, ['check']) - assert result.exit_code == 0 diff --git a/tests/integration/test_plugin.py b/tests/integration/test_plugin.py index a6a0dbf..2221b71 100644 --- a/tests/integration/test_plugin.py +++ b/tests/integration/test_plugin.py @@ -1,6 +1,6 @@ import pytest -from conan_for_poetry.plugin import ConanPlugin +from synodic_poetry.plugin import SynodicPlugin from path import Path from distutils.dir_util import copy_tree @@ -20,64 +20,64 @@ class TestPlugin(): def test_poetry_new(self): - ConanPlugin().poetry_new() + SynodicPlugin().poetry_new() def test_poetry_init(self): - ConanPlugin().poetry_init() + SynodicPlugin().poetry_init() def test_poetry_install(self, test_project): - ConanPlugin().poetry_install() + SynodicPlugin().poetry_install() def test_poetry_update(self, test_project): - ConanPlugin().poetry_update() + SynodicPlugin().poetry_update() def test_poetry_add(self): - ConanPlugin().poetry_add() + SynodicPlugin().poetry_add() def test_poetry_remove(self): - ConanPlugin().poetry_remove() + SynodicPlugin().poetry_remove() def test_poetry_show(self): - ConanPlugin().poetry_show() + SynodicPlugin().poetry_show() def test_poetry_build(self): - ConanPlugin().poetry_build() + SynodicPlugin().poetry_build() def test_poetry_publish(self): - ConanPlugin().poetry_publish() + SynodicPlugin().poetry_publish() def test_poetry_config(self): - ConanPlugin().poetry_config() + SynodicPlugin().poetry_config() def test_poetry_check(self): - ConanPlugin().poetry_check() + SynodicPlugin().poetry_check() def test_poetry_search(self): - ConanPlugin().poetry_search() + SynodicPlugin().poetry_search() def test_poetry_lock(self): - ConanPlugin().poetry_lock() + SynodicPlugin().poetry_lock() def test_poetry_version(self): - ConanPlugin().poetry_version() + SynodicPlugin().poetry_version() def test_poetry_export(self): - ConanPlugin().poetry_export() + SynodicPlugin().poetry_export() def test_poetry_env(self): - ConanPlugin().poetry_env() + SynodicPlugin().poetry_env()