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

twine check fails for multi-line description #422

Closed
jovial opened this issue Oct 29, 2018 · 3 comments
Closed

twine check fails for multi-line description #422

jovial opened this issue Oct 29, 2018 · 3 comments

Comments

@jovial
Copy link

jovial commented Oct 29, 2018

Your Environment

Thank you for taking the time to report an issue.

To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.

  1. Your operating system:
(venv) [will@juno kayobe]$ uname -a
Linux juno 4.18.14-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 13 13:42:37 UTC 2018 x86_64 GNU/Linux
  1. Version of python you are running:
(venv) [will@juno kayobe]$ python --version
Python 3.7.0
  1. How did you install twine? Did you use your operating system's package manager or pip or something else?

pip install -U twine

  1. Version of twine you have installed (include complete output of):
(venv) [will@juno kayobe]$ twine --version
twine version 1.12.1 (pkginfo: 1.4.2, requests: 2.20.0, setuptools: 39.0.1,
requests-toolbelt: 0.8.0, tqdm: 4.28.1)
  1. Which package repository are you targeting?

pypi

If you're having issues uploading a specific package, you must include a copy of the following:

  • The package's PKG-INFO file
  • A redacted version of your .pypirc file (REMOVE ALL USERNAMES & PASSWORDS BEFORE UPLOADING)
(venv) [will@juno kayobe]$ cat kayobe.egg-info/PKG-INFO 
Metadata-Version: 1.1
Name: kayobe
Version: 3.1.1.dev212
Summary: 
Deployment of OpenStack to bare metal using OpenStack kolla and bifrost
Home-page: https://kayobe.readthedocs.io/en/latest/
Author: OpenStack
Author-email: openstack-dev@lists.openstack.org
License: UNKNOWN
Description: ======
        Kayobe
        ======
        
        Kayobe enables deployment of containerised OpenStack to bare metal.
        
        Containers offer a compelling solution for isolating OpenStack services, but
        running the control plane on an orchestrator such as Kubernetes or Docker
        Swarm adds significant complexity and operational overheads.
        
        The hosts in an OpenStack control plane must somehow be provisioned, but
        deploying a secondary OpenStack cloud to do this seems like overkill.
        
        Kayobe stands on the shoulders of giants:
        
        * OpenStack bifrost discovers and provisions the cloud
        * OpenStack kolla builds container images for OpenStack services
        * OpenStack kolla-ansible delivers painless deployment and upgrade of
          containerised OpenStack services
        
        To this solid base, kayobe adds:
        
        * Configuration of cloud host OS & flexible networking
        * Management of physical network devices
        * A friendly openstack-like CLI
        
        All this and more, automated from top to bottom using Ansible.
        
        * Free software: Apache license
        * Documentation: https://kayobe.readthedocs.io/en/latest/
        * Source: https://git.openstack.org/cgit/openstack/kayobe
        * Bugs: https://storyboard.openstack.org/#!/project/openstack/kayobe
        * Release Notes: https://docs.openstack.org/releasenotes/kayobe
        * IRC: #openstack-kayobe
        
        Features
        --------
        
        * Heavily automated using Ansible
        * *kayobe* Command Line Interface (CLI) for cloud operators
        * Deployment of a *seed* VM used to manage the OpenStack control plane
        * Configuration of physical network infrastructure
        * Discovery, introspection and provisioning of control plane hardware using
          `OpenStack bifrost <https://docs.openstack.org/bifrost/latest/>`_
        * Deployment of an OpenStack control plane using `OpenStack kolla-ansible
          <https://docs.openstack.org/kolla-ansible/latest/>`_
        * Discovery, introspection and provisioning of bare metal compute hosts
          using `OpenStack ironic <https://docs.openstack.org/ironic/latest/>`_ and
          `ironic inspector <https://docs.openstack.org/ironic-inspector/latest/>`_
        * Virtualised compute using `OpenStack nova
          <https://docs.openstack.org/nova/latest/>`_
        * Containerised workloads on bare metal using `OpenStack magnum
          <https://docs.openstack.org/magnum/latest/>`_
        * Big data on bare metal using `OpenStack sahara
          <https://docs.openstack.org/sahara/latest/>`_
        
        In the near future we aim to add support for the following:
        
        * Control plane and workload monitoring and log aggregation using `OpenStack
          monasca <https://wiki.openstack.org/wiki/Monasca>`_
        
        
Platform: UNKNOWN
Classifier: Environment :: OpenStack
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5

The Issue

I'm getting:

(venv) [will@juno kayobe]$ twine check dist/*
Checking distribution dist/kayobe-3.1.1.dev212-py2.py3-none-any.whl: Failed
The project's long_description has invalid markup which will not be rendered on PyPI. The following syntax errors were detected:
line 7: Error: Unexpected indentation.
Checking distribution dist/kayobe-3.1.1.dev212-py3-none-any.whl: Failed
The project's long_description has invalid markup which will not be rendered on PyPI. The following syntax errors were detected:
line 7: Error: Unexpected indentation.
line 7: Error: Unexpected indentation.
Checking distribution dist/kayobe-3.1.1.dev212: InvalidDistribution: Unknown distribution format: 'kayobe-3.1.1.dev212'

but from the looks of the (spec)[https://www.python.org/dev/peps/pep-0314/#description-optional] the generated output looks OK.

(venv) [will@juno kayobe]$ python setup.py check -r -s
running check
The project's long description is valid RST.

Steps to Reproduce

If the issue is predictable and consistently reproducible, please list the steps here.

git clone https://github.com/openstack/kayobe && cd kayobe
python3 -m venv venv
source venv/bin/activate
pip install wheel
pip install docutils
pip install Pygments
pip install twine
python setup.py sdist bdist_wheel`
twine check dist/*
@di
Copy link
Sponsor Member

di commented Oct 29, 2018

Does it fail when checking the sdist as well? Can you try upgrading the versions of wheel and setuptools (pip install -U wheel setuptools) and see if this is still reproducible?

@di
Copy link
Sponsor Member

di commented Oct 29, 2018

Actually, I think this is just a duplicate of pypa/setuptools#1390.

@jovial
Copy link
Author

jovial commented Oct 29, 2018

Thanks for the hints. To answer your questions:

  • The behavior was the same when upgrading wheel and setuptools
  • This was also an issue when checking sdist

I found that changing:

summary =
    Deployment of OpenStack to bare metal using OpenStack kolla and bifrost

to:

summary = Deployment of OpenStack to bare metal using OpenStack kolla and bifrost

in setup.cfg fixed things. I guess this is because of:

Just wanted to point out that this is not limited to just the Summary field -- any field with a double newline will cause the rest of the PKG-INFO file after those newlines to be interpreted as the "message body" and thus become the Long-Description.

@jovial jovial closed this as completed Oct 29, 2018
openstack-gerrit pushed a commit to openstack/kayobe that referenced this issue Oct 29, 2018
Without this change twine check dist/* would fail as this was
producing a double new line. The rest of the PKG-INFO would then
be interpreted as the message body and become the long
description. See pypa/twine#422 for
more details.

This fixes the test-release-openstack-python3 zuul job.

TrivialFix

Change-Id: If1330c4824e949aa427475dfcc26218fb398a66e
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

No branches or pull requests

2 participants