Skip to content

Instantly share code, notes, and snippets.

@kxxoling
Created October 7, 2017 11:35
Show Gist options
  • Select an option

  • Save kxxoling/01092d96b077664d602e1b3cae5dfe29 to your computer and use it in GitHub Desktop.

Select an option

Save kxxoling/01092d96b077664d602e1b3cae5dfe29 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
import ConfigParser
from setuptools import find_packages, setup, Command
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
long_description = '\n' + f.read()
if sys.argv[-1] == "publish":
os.system("python setup.py sdist bdist_wheel upload")
sys.exit()
with open(os.path.join(here, 'Pipfile')) as f:
config = ConfigParser.RawConfigParser(allow_no_value=True)
config.readfp(f)
required = config.items('packages')
installed_requires = [('%s%s' % i) for i in [
(lib, ver!='"*"' and ver.replace('"', '') or '')
for lib, ver in required]
]
setup(
name='pipenv',
version=__version__,
description='Python setpy.py for Humans.',
long_description=long_description,
author='Kane Blueriver',
author_email='kxxoling@gmail.com',
url='',
packages=find_packages(exclude=['tests']),
entry_points={
'console_scripts': ['%s=%s:cli' % ('your-lib',)*2],
},
install_requires=installed_requires,
include_package_data=True,
license='MIT',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'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 :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
],
)
@kxxoling

kxxoling commented Oct 7, 2017

Copy link
Copy Markdown
Author

Not tested draft code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment