Skip to content

Commit

Permalink
Make the package pip installable
Browse files Browse the repository at this point in the history
Fill setup.py to match the dependencies specified in spec file,
which will allow the usage of virtual environments for local
development.

Related: sclorg#107
  • Loading branch information
khardix committed Sep 5, 2018
1 parent d5b9289 commit 6c9b7ec
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 10 deletions.
114 changes: 114 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,117 @@ data/db.sqlite3
softwarecollections-*.tar.gz
packaging-guide
*.swp
venv-*/

# added by gitignore-cli

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json
57 changes: 47 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
#!/usr/bin/env python3
# encoding: utf-8

import softwarecollections
#from distutils.core import setup
import os
from setuptools import setup, find_packages

REPO_DIR = os.path.dirname(os.path.abspath(__file__))

METADATA = {
"name": "softwarecollections",
"version": "0.16",
"author": "Jakub Dorňák",
"author_email": "[email protected]",
"maintainer": "Jan Staněk",
"maintainer_email": "[email protected]",
"url": "https://github.com/sclorg/softwarecollections",
}

# Basic/common package dependencies
REQUIRES = [
"django-fas",
"django-markdown2",
"django-sekizai",
"django-simple-captcha",
"django-tagging",
"django<1.11",
"flock",
"py3dns", # pylibravatar missing dependency workaround
"pylibravatar",
"python3-memcached",
"python3-openid",
"requests",
]

# Extra dependencies for production
PROD_REQUIRES = [
"mod_wsgi",
"psycopg2",
]


with open(os.path.join(REPO_DIR, "README.md"), encoding="utf-8") as readme:
long_description = readme.read()

setup(
name = "softwarecollections",
version = '0.16',
description = "Software Collection Management Website and Utils",
author = "Jakub Dorňák",
author_email = "[email protected]",
url = "https://github.com/sclorg/softwarecollections",
packages = find_packages(),
include_package_data = True,
**METADATA,
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
include_package_data=True,
python_requires=">=3",
install_requires=REQUIRES,
extras_require={"production": PROD_REQUIRES},
)

0 comments on commit 6c9b7ec

Please sign in to comment.