Skip to content

Commit

Permalink
Use dependency_links to install prompt_toolkit 2.0
Browse files Browse the repository at this point in the history
To avoid having to install using a bash script, we can specify a version of prompt_toolkit and provide the github branch tarball for 2.0 as a dependency link.

This means when installing with pip install sml-sync --process-dependency-links, pip will install prompt toolkit from the github repo.

This means we can close the bitbucket repo.
  • Loading branch information
Jan (temporary) committed May 8, 2018
1 parent a933fe8 commit 17976a0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
entry_points={
'console_scripts': ['sml-sync=sml_sync:run']
},
# prompt_toolkit 2.0 is currently only available from github:
dependency_links = ['https://github.com/'
+ 'jonathanslenders/python-prompt-toolkit/'
+ 'tarball/2.0#egg=prompt_toolkit-2.0'],

This comment has been minimized.

Copy link
@pbugnion

pbugnion May 9, 2018

Contributor

For reference, Python does string concatenation without a +:

Instead of writing ['a' + 'b'], it's more idiomatic to write ['a' 'b'].

install_requires=[
'sml',
'daiquiri',
'paramiko',
'inflect',
'watchdog',
'semantic_version'
# This is currently missing prompt-toolkit
# (waiting for 2.0 to be released)
'semantic_version',
'prompt_toolkit>=2.0'
]
)

5 comments on commit 17976a0

@pbugnion
Copy link
Contributor

@pbugnion pbugnion commented on 17976a0 May 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be an alternative? I think it only works for pip 10 onwards, though.

Never mind -- I still don't think you can specify the URL-like syntax in install_requires (if the last comment on this is anything to go by).

I think your changes look good. We should test it with different versions of pip.

@janfreyberg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll try it out.

@srstevenson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janfreyberg: Can you set your committer name and email and amend this commit?

From: "Jan (temporary)" <[email protected]>

@janfreyberg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srstevenson Just tried that but amending the commit doesn't seem to be changing the email in the commit

@srstevenson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use e.g. git commit --amend --no-edit --author="Author Name <[email protected]>".

Please sign in to comment.