Skip to content

Commit

Permalink
📦 Substitute pbr with setuptools-scm
Browse files Browse the repository at this point in the history
Also:
* 🎨 include a shim to simulate setuptools' ability to read data from
``setup.cfg`` under ancient envs.
* ⬆️ BSpecify project stability in metadata properly
* ⬆️ Bump required tox to v3.8.4
* 🎨 Retrieve Molecule version using pkg_resources
* 🐛 Whitelist find in tox in build-dists
* 🎨 Enable isolated build in tox
* 🔥 Drop Ansible 2.4 factor ref from tox
* ⬆️ Bump setuptools req to v41.0.0
* 🎨 Wire up tox build-dists env into Travis CI

Co-Authored-By: webknjaz <wk.cvs.github@sydorenko.org.ua>
  • Loading branch information
webknjaz and webknjaz committed Apr 9, 2019
1 parent 50688a8 commit 9a58ecc
Show file tree
Hide file tree
Showing 12 changed files with 654 additions and 87 deletions.
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
202 changes: 202 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# Force LF line endings for text files
* text=auto eol=lf

## SOURCE CODE
*.bat text eol=crlf
*.coffee text
*.css text
*.htm text diff=html
*.html text diff=html
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.od text
*.onlydata text
*.php text diff=php
*.pl text
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.rb text diff=ruby
*.sass text
*.scm text
*.scss text
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.vue text
*.xml text
*.xhtml text diff=html

## DOCKER
*.dockerignore text
Dockerfile text

## DOCUMENTATION
*.ipynb text
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

## TEMPLATES
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text

## LINTERS
.csslintrc text
.eslintrc text
.htmlhintrc text
.jscsrc text
.jshintrc text
.jshintignore text
.stylelintrc text

## CONFIGS
*.bowerrc text
*.cnf text
*.conf text
*.config text
.babelrc text
.browserslistrc text
.editorconfig text
.env text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text
*.npmignore text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

## HEROKU
Procfile text
.slugignore text

## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary

## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary

## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

## EXECUTABLES
*.exe binary
*.pyc binary

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pyd binary
*.pyo binary

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).

# Needed for setuptools-scm-git-archive:
.git_archival.txt export-subst
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ jobs:
name: Publishing current Git tagged version of dist to PyPI
if: repo == "ansible/molecule" AND tag IS present
env:
TOXENV: metadata-validation
TOXENV: metadata-validation,build-dists
before_deploy:
- echo > setup.py
deploy: &deploy-step
provider: pypi
user: ansible-molecule
Expand Down
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

2 changes: 0 additions & 2 deletions lint-requirements.txt

This file was deleted.

12 changes: 9 additions & 3 deletions molecule/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) 2019 Red Hat, Inc.
# Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -17,8 +18,13 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
"""Molecule version information."""

import pbr.version
from __future__ import absolute_import, division, print_function
__metaclass__ = type

version_info = pbr.version.VersionInfo('molecule') # noqa
__version__ = version_info.release_string()
try:
import pkg_resources
__version__ = pkg_resources.get_distribution('molecule').version
except Exception:
__version__ = 'unknown'
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build-system]
requires = [
"setuptools >= 41.0.0",
"setuptools_scm >= 1.15.0",
"setuptools_scm_git_archive >= 1.0",
"wheel",
]
build-backend = "setuptools.build_meta"
20 changes: 0 additions & 20 deletions requirements.txt

This file was deleted.

Loading

0 comments on commit 9a58ecc

Please sign in to comment.