-
Notifications
You must be signed in to change notification settings - Fork 106
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
Updated template to look like the Python Packaging User Guid's sample… #18
Open
constrict0r
wants to merge
9
commits into
kragniz:master
Choose a base branch
from
constrict0r:pypa-guide
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9dff365
Updated template to look like the Python Packaging User Guid's sample…
afb1996
Add missing y to py{ ...
e34bbc4
Delete whitespace, mv commands below deps
c02de6f
Fixed typo
212fd94
Merge pull request #1 from constrict0r/pypa-guide
c6597f2
Updated heading of readme to better display
d3a3393
Remove comment at the top
4aac6ec
Merge branch 'pypa-guide'
1a8617b
Revert README.rst header
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,17 +1,14 @@ | ||
import io | ||
import os | ||
import re | ||
""" Minimal cookiecutter template """ | ||
|
||
from setuptools import find_packages | ||
from setuptools import setup | ||
from os import path | ||
from io import open | ||
from setuptools import find_packages, setup | ||
|
||
here = path.abspath(path.dirname(__file__)) | ||
|
||
def read(filename): | ||
filename = os.path.join(os.path.dirname(__file__), filename) | ||
text_type = type(u"") | ||
with io.open(filename, mode="r", encoding='utf-8') as fd: | ||
return re.sub(text_type(r':[a-z]+:`~?(.*?)`'), text_type(r'``\1``'), fd.read()) | ||
|
||
# Get the long description from the README file. | ||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't take into account the removal of Sphinx directives. |
||
long_description = f.read() | ||
|
||
setup( | ||
name="{{ cookiecutter.package_name }}", | ||
|
@@ -23,14 +20,17 @@ def read(filename): | |
author_email="{{ cookiecutter.author_email }}", | ||
|
||
description="{{ cookiecutter.package_description }}", | ||
long_description=read("README.rst"), | ||
long_description=long_description, | ||
|
||
packages=find_packages(exclude=('tests',)), | ||
|
||
install_requires=[], | ||
|
||
zip_safe=False, | ||
|
||
classifiers=[ | ||
'Development Status :: 2 - Pre-Alpha', | ||
'Topic :: Software Development :: Build Tools', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
|
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,4 +1,4 @@ | ||
# Sample Test passing with nose and pytest | ||
# Sample Test passing with nose and pytest | ||
|
||
def test_pass(): | ||
assert True, "dummy sample test" | ||
def test_success(): | ||
assert True |
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,6 +1,6 @@ | ||
[tox] | ||
envlist = py27,py34,py35,py36,py37 | ||
envlist = p{27,34,35,36,37} | ||
|
||
[testenv] | ||
commands = py.test {{ cookiecutter.package_name }} | ||
commands = py.test tests | ||
deps = pytest |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recommended to use
import os
and useos.path
, the same withio
.