Skip to content

Commit

Permalink
Moved the metadata into setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Mar 1, 2020
1 parent 850693c commit c060cb1
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 47 deletions.
8 changes: 4 additions & 4 deletions .ci/travis.sh
Expand Up @@ -5,13 +5,13 @@ echo $TRAVIS_PYTHON_VERSION
# Listed twice to workaround Python 2.6
if [[ "$(uname -s)" == 'Darwin' ]]; then
python$PY3 -m pip install --upgrade pip
python$PY3 -m pip install -r dev-requirements.txt
python$PY3 -m pip install coveralls
python$PY3 -m pip install --upgrade -r dev-requirements.txt
python$PY3 -m pip install --upgrade coveralls
python$PY3 -m pip install -e .
else
pip install --upgrade pip
pip install -r dev-requirements.txt
pip install coveralls
pip install --upgrade -r dev-requirements.txt
pip install --upgrade coveralls
pip install -e .
fi

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,6 +6,7 @@ __pycache__
.settings/
/dist
/plumbum.egg-info
/plumbum/version.py
/build
*.class
*.ropeproject
Expand Down
2 changes: 2 additions & 0 deletions dev-requirements.txt
Expand Up @@ -5,6 +5,8 @@ idna<2.8 ; python_version < '2.7'
pycparser<2.18 ; python_version < '2.7'
paramiko<2.4 ; python_version < '2.7'
paramiko ; python_version >= '2.7'
pathlib2 ; python_version < '3'
setuptools
setuptools_scm
wheel ; python_version >= '2.7'
psutil
3 changes: 0 additions & 3 deletions plumbum/version.py

This file was deleted.

7 changes: 7 additions & 0 deletions pyproject.toml
@@ -0,0 +1,7 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.3", "pathlib2; python_version < '3'" ]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "plumbum/version.py"
write_to_template = "__version__ = version_string = \"{version}\"\nversion = tuple(int(n) for n in version_string.split(\".\")[:3])\n"
55 changes: 52 additions & 3 deletions setup.cfg
@@ -1,5 +1,54 @@
[bdist_wheel]
universal = 1

[metadata]
name = plumbum
author = Tomer Filiba
author_email = tomerfiliba@gmail.com
license = MIT
description = Plumbum: shell combinators library
keywords =
path,
local,
remote,
ssh,
shell,
pipe,
popen,
process,
execution,
color,
cli
url = https://plumbum.readthedocs.io
long_description = file: README.rst
long_description_content_type = text/x-rst
license_file = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: Software Development :: Build Tools
Topic :: System :: Systems Administration
platforms = POSIX, Windows
provides = plumbum

[options]
packages = find:
setup_requires =
setuptools>=42
wheel
setuptools_scm[toml]>=3.4.3
pathlib2; python_version < '3'

[options.package_data]
plumbum.cli = i18n/*/LC_MESSAGES/*.mo


[bdist_wheel]
universal = 1
44 changes: 7 additions & 37 deletions setup.py
@@ -1,10 +1,14 @@
#!/usr/bin/env python
import os
from setuptools import setup, Command
from datetime import date

try:
from setuptools import setup, Command
from pathlib import Path
except ImportError:
from distutils.core import setup, Command
from pathlib2 import Path

HERE = Path(__file__).absolute().parent

# Fix for building on non-Windows systems
import codecs
Expand All @@ -15,9 +19,6 @@
func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
codecs.register(func)

HERE = os.path.dirname(__file__)
exec(open(os.path.join(HERE, "plumbum", "version.py")).read())

class PyDocs(Command):
user_options = []
def initialize_options(self):
Expand Down Expand Up @@ -52,37 +53,6 @@ def run(self):


setup(name = "plumbum",
version = version_string, # @UndefinedVariable
description = "Plumbum: shell combinators library",
author = "Tomer Filiba",
author_email = "tomerfiliba@gmail.com",
license = "MIT",
url = "https://plumbum.readthedocs.io",
packages = ["plumbum", "plumbum.cli", "plumbum.commands", "plumbum.machines", "plumbum.path", "plumbum.fs", "plumbum.colorlib"],
package_data={
"plumbum.cli":["i18n/*/LC_MESSAGES/*.mo"]
},
platforms = ["POSIX", "Windows"],
provides = ["plumbum"],
keywords = "path, local, remote, ssh, shell, pipe, popen, process, execution, color, cli",
cmdclass = {'test':PyTest,
'docs':PyDocs},
long_description = open(os.path.join(HERE, "README.rst"), "r").read(),
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Build Tools",
"Topic :: System :: Systems Administration",
],
'docs':PyDocs}
)

0 comments on commit c060cb1

Please sign in to comment.