[CalendarServer-changes] [12196] twext/trunk/setup.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:19:24 PDT 2014
Revision: 12196
http://trac.calendarserver.org//changeset/12196
Author: wsanchez at apple.com
Date: 2013-12-23 14:33:29 -0800 (Mon, 23 Dec 2013)
Log Message:
-----------
Use setuptools.
Modified Paths:
--------------
twext/trunk/setup.py
Modified: twext/trunk/setup.py
===================================================================
--- twext/trunk/setup.py 2013-12-23 22:21:38 UTC (rev 12195)
+++ twext/trunk/setup.py 2013-12-23 22:33:29 UTC (rev 12196)
@@ -19,35 +19,28 @@
from __future__ import print_function
import sys
-import os
+from os.path import dirname, join as joinpath
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), "support"))
+# from distutils.core import setup
+from setuptools import setup, find_packages as setuptools_find_packages
+sys.path.insert(0, joinpath(dirname(__file__), "support"))
+
from version import version
+#
+# Utilities
+#
+
def find_packages():
modules = [
"twisted.plugins",
]
- excludes = [
- ".svn",
- "_trial_temp",
- "build",
- ]
+ return modules + setuptools_find_packages()
- for root, dirs, files in os.walk("."):
- for exclude in excludes:
- if exclude in dirs:
- dirs.remove(exclude)
- if "__init__.py" in files:
- modules.append(".".join(root.split(os.path.sep)[1:]))
-
- return modules
-
-
#
# Options
#
@@ -65,7 +58,7 @@
#
version_string = version()
-version_file = file(os.path.join("twext", "version.py"), "w")
+version_file = file(joinpath("twext", "version.py"), "w")
version_file.write('version = "{0}"\n'.format(version_string))
version_file.close()
@@ -93,8 +86,6 @@
#
def doSetup():
- from distutils.core import setup
-
setup(
name="twextpy",
version=version_string,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/31ad7b43/attachment.html>
More information about the calendarserver-changes
mailing list