Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #184 from koxudaxi/fix_replaced_python_verison
Browse files Browse the repository at this point in the history
Fix replaced Python restricted dependencies
  • Loading branch information
koxudaxi committed Feb 9, 2021
2 parents dbae674 + 8707bfa commit e4191dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion resources/META-INF/plugin.xml
@@ -1,9 +1,14 @@
<idea-plugin url="https://github.com/koxudaxi/poetry-pycharm-plugin" require-restart="true">
<id>com.koxudaxi.poetry</id>
<name>Poetry</name>
<version>1.0.6</version>
<version>1.0.7</version>
<vendor email="koaxudai@gmail.com">Koudai Aono @koxudaxi</vendor>
<change-notes><![CDATA[
<h2>version 1.0.7</h2>
<p>Bug fixes</p>
<ul>
<li>Fix replaced Python restricted dependencies [#184]</li>
</ul>
<h2>version 1.0.6</h2>
<p>Bug fixes</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion src/com/koxudaxi/poetry/poetry.kt
Expand Up @@ -75,7 +75,7 @@ const val PY_PROJECT_TOML: String = "pyproject.toml"
const val POETRY_LOCK: String = "poetry.lock"
const val POETRY_DEFAULT_SOURCE_URL: String = "https://pypi.org/simple"
const val POETRY_PATH_SETTING: String = "PyCharm.Poetry.Path"
const val REPLACE_PYTHON_VERSION = """import re,sys;f=open("pyproject.toml", "r+");orig=f.read();f.seek(0);f.write(re.sub(r"(python = \"\^)[^\"]+(\")", "\g<1>"+sys.version.split()[0]+"\g<2>", orig))"""
const val REPLACE_PYTHON_VERSION = """import re,sys;f=open("pyproject.toml", "r+");orig=f.read();f.seek(0);f.write(re.sub(r"(python = \"\^)[^\"]+(\")", "\g<1>"+'.'.join(str(v) for v in sys.version_info[:2])+"\g<2>", orig))"""

// TODO: Provide a special icon for poetry
// TODO: Need a extension point
Expand Down

0 comments on commit e4191dc

Please sign in to comment.