Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep pbr dependency in setup_requires (fixes #308, follows #309) #310

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented Jun 8, 2018

Follow up on #309 to fix #308 but keep build time dependency pbr in setup_requires and remove the following warning:

./.venv/bin/python setup.py --help                                                            
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'pbr'                                                                                                                      
  warnings.warn(msg)                                                                                                                                                                                           
Common commands: (see '--help-commands' for more)                                                                                                                                                              
                                                                                                                                                                                                               
  setup.py build      will build the package underneath 'build/'                                                                                                                                               
  setup.py install    will install the package                                                                                                                                                                 
                                                                                                                                                                                                               
Global options:                                                                                                   
[...]

@codecov-io
Copy link

codecov-io commented Jun 8, 2018

Codecov Report

Merging #310 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #310   +/-   ##
=======================================
  Coverage   96.31%   96.31%           
=======================================
  Files          11       11           
  Lines         814      814           
  Branches      100      100           
=======================================
  Hits          784      784           
  Misses         10       10           
  Partials       20       20

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd4d999...2f8a3be. Read the comment docs.

@pdecat
Copy link
Contributor Author

pdecat commented Jun 8, 2018

Hi @ajkavanagh, you should probably consider including this fix before releasing 2.2.7.

@pdecat
Copy link
Contributor Author

pdecat commented Jun 8, 2018

Without this change

# rm -rf .venv/
# python3 -m venv .venv

# ./.venv/bin/pip install wheel
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.31.1

# ./.venv/bin/python setup.py --help
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'pbr'
  warnings.warn(msg)
Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)      run verbosely (default)
  --quiet (-q)        run quietly (turns verbosity off)
  --dry-run (-n)      don't actually do anything
  --help (-h)         show detailed help message
  --no-user-cfg       ignore pydistutils.cfg in your home directory
  --command-packages  list of packages that provide distutils commands

Information display options (just display information, ignore any commands)
  --help-commands     list all available commands
  --name              print package name
  --version (-V)      print package version
  --fullname          print <package name>-<version>
  --author            print the author's name
  --author-email      print the author's email address
  --maintainer        print the maintainer's name
  --maintainer-email  print the maintainer's email address
  --contact           print the maintainer's name if known, else the author's
  --contact-email     print the maintainer's email address if known, else the
                      author's
  --url               print the URL for this package
  --license           print the license of the package
  --licence           alias for --license
  --description       print the package description
  --long-description  print the long package description
  --platforms         print the list of platforms
  --classifiers       print the list of classifiers
  --keywords          print the list of keywords
  --provides          print the list of packages/modules provided
  --requires          print the list of packages/modules required
  --obsoletes         print the list of packages/modules made obsolete

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

# ./.venv/bin/pip install .
Processing /home/pdecat/workspaces/thirdparty/pylxd
Collecting pbr>=1.8 (from pylxd==2.2.7)
  Using cached https://files.pythonhosted.org/packages/b3/5d/c196041ffdf3e34ba206db6d61d1f893a75e1f3435699ade9bd65e089a3d/pbr-4.0.4-py2.py3-none-any.whl
Collecting requests!=2.8.0,>=2.5.2 (from pylxd==2.2.7)
  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl
Collecting requests-unixsocket>=0.1.5 (from pylxd==2.2.7)
Collecting idna<2.7,>=2.5 (from requests!=2.8.0,>=2.5.2->pylxd==2.2.7)
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests!=2.8.0,>=2.5.2->pylxd==2.2.7)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests!=2.8.0,>=2.5.2->pylxd==2.2.7)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests!=2.8.0,>=2.5.2->pylxd==2.2.7)
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Installing collected packages: pbr, idna, certifi, chardet, urllib3, requests, requests-unixsocket, pylxd
  Running setup.py install for pylxd ... done
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.6 pbr-4.0.4 pylxd-2.2.7.dev22 requests-2.18.4 requests-unixsocket-0.1.5 urllib3-1.22

With this change

# rm -rf .venv/
# python3 -m venv .venv

# ./.venv/bin/pip install wheel
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.31.1

# ./.venv/bin/python setup.py --help
Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)      run verbosely (default)
  --quiet (-q)        run quietly (turns verbosity off)
  --dry-run (-n)      don't actually do anything
  --help (-h)         show detailed help message
  --no-user-cfg       ignore pydistutils.cfg in your home directory
  --command-packages  list of packages that provide distutils commands

Information display options (just display information, ignore any commands)
  --help-commands     list all available commands
  --name              print package name
  --version (-V)      print package version
  --fullname          print <package name>-<version>
  --author            print the author's name
  --author-email      print the author's email address
  --maintainer        print the maintainer's name
  --maintainer-email  print the maintainer's email address
  --contact           print the maintainer's name if known, else the author's
  --contact-email     print the maintainer's email address if known, else the
                      author's
  --url               print the URL for this package
  --license           print the license of the package
  --licence           alias for --license
  --description       print the package description
  --long-description  print the long package description
  --platforms         print the list of platforms
  --classifiers       print the list of classifiers
  --keywords          print the list of keywords
  --provides          print the list of packages/modules provided
  --requires          print the list of packages/modules required
  --obsoletes         print the list of packages/modules made obsolete

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

# ./.venv/bin/pip install .
Processing /home/pdecat/workspaces/thirdparty/pylxd
Collecting cryptography!=1.3.0,>=1.0 (from pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/fa/f4/3cde3604972dfa2b0fea85b9711948bb4fb70ab64095322aef35071bd254/cryptography-2.2.2-cp34-abi3-manylinux1_x86_64.whl
Collecting pbr>=1.6 (from pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/b3/5d/c196041ffdf3e34ba206db6d61d1f893a75e1f3435699ade9bd65e089a3d/pbr-4.0.4-py2.py3-none-any.whl
Collecting python-dateutil>=2.4.2 (from pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl
Collecting requests!=2.12.0,!=2.12.1,!=2.8.0,>=2.5.2 (from pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl
Collecting requests-toolbelt>=0.8.0 (from pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/97/8a/d710f792d6f6ecc089c5e55b66e66c3f2f35516a1ede5a8f54c13350ffb0/requests_toolbelt-0.8.0-py2.py3-none-any.whl
Collecting requests-unixsocket>=0.1.5 (from pylxd==2.2.7.dev23)
Collecting six>=1.9.0 (from pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting ws4py!=0.3.5,>=0.3.4 (from pylxd==2.2.7.dev23)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography!=1.3.0,>=1.0->pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting idna>=2.1 (from cryptography!=1.3.0,>=1.0->pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography!=1.3.0,>=1.0->pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests!=2.12.0,!=2.12.1,!=2.8.0,>=2.5.2->pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests!=2.12.0,!=2.12.1,!=2.8.0,>=2.5.2->pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests!=2.12.0,!=2.12.1,!=2.8.0,>=2.5.2->pylxd==2.2.7.dev23)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography!=1.3.0,>=1.0->pylxd==2.2.7.dev23)
Installing collected packages: pycparser, cffi, six, idna, asn1crypto, cryptography, pbr, python-dateutil, chardet, urllib3, certifi, requests, requests-toolbelt, requests-unixsocket, ws4py, pylxd
  Running setup.py install for pylxd ... done
Successfully installed asn1crypto-0.24.0 certifi-2018.4.16 cffi-1.11.5 chardet-3.0.4 cryptography-2.2.2 idna-2.6 pbr-4.0.4 pycparser-2.18 pylxd-2.2.7.dev23 python-dateutil-2.7.3 requests-2.18.4 requests-tool
belt-0.8.0 requests-unixsocket-0.1.5 six-1.11.0 urllib3-1.22 ws4py-0.5.1

@ajkavanagh
Copy link
Contributor

Okay, I'm going to merge this, but want to check out some scenarios before unleashing it on pypi.

Copy link
Contributor

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

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

LGTM

@ajkavanagh ajkavanagh merged commit 4b8ab18 into canonical:master Jun 8, 2018
@pdecat pdecat deleted the GH-308_fix_setup_requires_2 branch June 8, 2018 13:54
@blackboxsw
Copy link

Thanks for this update. This update for us in our cloud-init CI environments.

lasizoillo pushed a commit to lasizoillo/pylxd that referenced this pull request Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setup.py should not put runtime dependencies in setup_requires as it breaks pip dependency management
4 participants