File tree 5 files changed +16
-8
lines changed 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 8
8
" -e" ,
9
9
" GIT_EDITOR=code --wait"
10
10
],
11
- "postCreateCommand" : " pip3 install -e .[dev]" ,
11
+ "postCreateCommand" : " pip3 install -e .[cli, dev]" ,
12
12
"customizations" : {
13
13
"vscode" : {
14
14
"extensions" : [
Original file line number Diff line number Diff line change 9
9
jobs :
10
10
tests :
11
11
name : ${{ matrix.session }} ${{ matrix.python-version }}
12
- runs-on : ubuntu-20 .04
12
+ runs-on : ubuntu-22 .04
13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
31
31
run : pip install pip
32
32
33
33
- name : Setup
34
- run : pip install -e .[dev]
34
+ run : pip install -e .[cli, dev]
35
35
36
36
- name : Run Pytest
37
37
run : pytest tests
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ it's a vacuum.
27
27
28
28
If you have a recent version of Python 3, you should be able to
29
29
do ` pip install py-sucks ` to get the most recently released version of
30
- this.
30
+ this. In order to use the command line (cli) tool, you need to install
31
+ the additional cli requirements by ` pip install py-sucks[cli] `
31
32
32
33
## Usage
33
34
Original file line number Diff line number Diff line change 48
48
# https://packaging.python.org/en/latest/requirements.html
49
49
install_requires = [
50
50
"sleekxmppfs>=1.4.1" ,
51
- "click>=6" ,
52
51
"requests>=2.18" ,
53
52
"pycryptodome>=3.4" ,
54
- "pycountry-convert>=0.5" ,
55
53
],
56
54
# List additional groups of dependencies here (e.g. development
57
55
# dependencies). You can install these using the following syntax,
58
56
# for example:
59
57
# $ pip install -e .[dev,test]
60
58
extras_require = {
59
+ "cli" : ["click>=6" , "pycountry-convert>=0.5" ],
61
60
"dev" : ["pytest" , "requests-mock>=1.3" ],
62
61
},
63
62
# If there are data files included in your packages that need to be
Original file line number Diff line number Diff line change 2
2
import itertools
3
3
import os
4
4
import platform
5
+ import sys
5
6
import random
6
7
import re
7
8
8
- import click
9
- from pycountry_convert import country_alpha2_to_continent_code
9
+ try :
10
+ import click
11
+ from pycountry_convert import country_alpha2_to_continent_code
12
+ except ImportError :
13
+ print (
14
+ "The extra dependencies are missing, "
15
+ "please use 'pip install py-sucks[cli]' to install them."
16
+ )
17
+ sys .exit (1 )
10
18
11
19
from sucks import *
12
20
You can’t perform that action at this time.
0 commit comments