Skip to content

Saleor Core: the high performance, composable, headless commerce API.

add setup script

Marek Brzóska998ea678a4e0
diff --git a/.gitignore b/.gitignore
index 328b0fa10a..27d0554bb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,6 @@
*.pyc
local_settings.py
dev.db
+build/
+dist/
+*.egg-info
diff --git a/README.md b/README.md
index 8d24837a16..93f64d898c 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,16 @@ Saleor
======
Avast ye landlubbers! Saleor be a Satchless store ye can fork.
+
+
+Usage
+-----
+
+1. Fork the repo on github (optionally)
+1. Checkout/download
+1. run ``python setup.py develop`` if you are going to develop or ``python setup.py install`` if you just want to install and run saleor
+1. run ``saleor syncdb --migrate``
+1. run ``saleor runserver`` for development server (on localhost:8000)
+
+``saleor`` is your shortcut for running ``python manage.py`` so you can use all manage.py commands and parameters
+
diff --git a/saleor/__init__.py b/saleor/__init__.py
index e69de29bb2..bc99e3e501 100644
--- a/saleor/__init__.py
+++ b/saleor/__init__.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+version = "n0t-3v3n-v3rs10ned.y3t"
+
+
+def manage():
+ import os
+ import sys
+ from django.core.management import execute_from_command_line
+
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings")
+ execute_from_command_line(sys.argv)
diff --git a/saleor/settings.py b/saleor/settings.py
index bbee6fb775..050352a04b 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -109,6 +109,7 @@ TEMPLATE_DIRS = (
)
INSTALLED_APPS = (
+ # Django modules
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -119,6 +120,11 @@ INSTALLED_APPS = (
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
+
+ # External apps
+ 'south',
+
+ # Local apps
)
# A sample logging configuration. The only tangible logging
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000000..1fb792a21d
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,27 @@
+#! /usr/bin/env python
+from setuptools import setup, find_packages
+from saleor import version
+
+
+REQUIREMENTS = [
+ 'Django == 1.5c1',
+ 'South >= 0.7.6',
+]
+
+setup(name='saleor',
+ author='Mirumee Software',
+ author_email='[email protected]',
+ description="A fork'n'play e-commerence in Django",
+ license='BSD',
+ version=version,
+ url='http://getsaleor.com/',
+ packages=find_packages(where='saleor'),
+ include_package_data=True,
+ install_requires=REQUIREMENTS,
+ dependency_links=['http://github.com/django/django/tarball/1.5c1#egg=Django-1.5c1'],
+ entry_points={
+ 'console_scripts': [
+ 'saleor = saleor:manage'
+ ]
+ },
+ )