-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let's be sure that we're testing the package and not the local copy when we run our tests.
- Loading branch information
1 parent
e5bbd11
commit cf6aefe
Showing
31 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,41 @@ | ||
"""Packaging logic for betamax.""" | ||
import os | ||
import re | ||
import sys | ||
from setuptools import setup, find_packages | ||
|
||
packages = find_packages(exclude=['tests', 'tests.integration']) | ||
requires = ['requests >= 2.0'] | ||
import setuptools | ||
|
||
__version__ = '' | ||
with open('betamax/__init__.py', 'r') as fd: | ||
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') | ||
packages = setuptools.find_packages( | ||
"src", | ||
exclude=["tests", "tests.integration"], | ||
) | ||
requires = ["requests >= 2.0"] | ||
|
||
__version__ = "" | ||
with open("src/betamax/__init__.py", "r") as fd: | ||
reg = re.compile(r"__version__ = [\'']([^\'']*)[\'']") | ||
for line in fd: | ||
m = reg.match(line) | ||
if m: | ||
__version__ = m.group(1) | ||
break | ||
|
||
if not __version__: | ||
raise RuntimeError('Cannot find version information') | ||
raise RuntimeError("Cannot find version information") | ||
|
||
if sys.argv[-1] in ['submit', 'publish']: | ||
if sys.argv[-1] in ["submit", "publish"]: | ||
os.system("python setup.py sdist bdist_wheel upload") | ||
sys.exit() | ||
|
||
|
||
def data_for(filename): | ||
"""Read the file data for a filename.""" | ||
with open(filename) as fd: | ||
content = fd.read() | ||
return content | ||
|
||
setup( | ||
|
||
setuptools.setup( | ||
name="betamax", | ||
version=__version__, | ||
description="A VCR imitation for python-requests", | ||
|
@@ -39,23 +46,24 @@ def data_for(filename): | |
author_email="[email protected]", | ||
url="https://github.com/sigmavirus24/betamax", | ||
packages=packages, | ||
package_data={'': ['LICENSE', 'AUTHORS.rst']}, | ||
package_dir={"": "src"}, | ||
package_data={"": ["LICENSE", "AUTHORS.rst"]}, | ||
include_package_data=True, | ||
install_requires=requires, | ||
entry_points={ | ||
'pytest11': ['pytest-betamax = betamax.fixtures.pytest'] | ||
"pytest11": ["pytest-betamax = betamax.fixtures.pytest"] | ||
}, | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'License :: OSI Approved', | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
] | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.