Commits

Anonymous committed 395cec3

Having two setup.py for rope and ropeide

Comments (0)

Files changed (12)

MANIFEST.in

-include COPYING
-recursive-include docs *.html *.txt
-include *.txt
-
-recursive-include rope *.py
-recursive-include ropetest *.py
-include *.py
-
-prune scripts
 New Features
 ============
 
-* Inferring the object list comprehensions contain
-* Adding support for Mercurial VCS in refactorings
-* Self assignment warning
-
-Rope can infer the object, list comprehensions and generator
-expressions hold.  For instance in::
-
-  class A(object):
-      pass
-
-  list1 = [A(), A()]
-  list2 = [a for a in l1]
-
-  var = list2[0]
-
-Rope knows that the type of `var` is `A`.
-
-Rope IDE can warn when you assign a variable to itself when you use
-``show_warnings`` action.
-
+*
 
 Getting Started
 ===============

docs/dev/issues.txt

 
 Issues:
 
+* Two separate README files?
 * The name of packages: using ``rope`` for the library and
   ``ropeide``, ``rope_ide``, ``rope-ide`` or ``pyrope`` for the IDE
 * Should the IDE contain the library?

docs/user/overview.txt

 can do in extremes.  So if you really want to feel the power of
 rope try its features and see its unit tests.
 
-Note that this file assumes emacs keybinding.
+Note that the IDE parts of this file assumes emacs keybinding.
 
 
 .. contents:: Table of Contents
 
 
-Keybinding
-==========
-
-You can change the keybinding in ``~/.rope``.  The keybinding is shown
-next to every action in menus.  Some of these bindings are chosen from
-emacs and some from eclipse.  ("C" stands for Control key and "M" for
-Meta(Alt) key.)
-
-
-Code Assist(Auto Complete)
-==========================
-
-You can complete names as you type by using code assist (``M-/``).
-The two capital letters in the left shows the type of the proposal.
-In the first column:
-
-* L: ``local``
-* G: ``global``
-* A: ``attribute``
-* T: ``template``
-* K: ``keyword``
-* B: ``built-in``
-* P: ``parameter_keyword``
-
-In the second column if present:
-
-* C: ``class``
-* F: ``function``
-* V: ``variable``
-* P: ``paramter``
-* I: ``imported``
-
-You can use ``main``, ``testcase``, ``hash``, ``eq`` and ``super``
-templates.  You can define your own templates in ``~/.rope``.  See
-examples in the default ``~/.rope`` file. (`rope.ui.dot_rope`
-module; It will be copied to ``~/.rope`` if none already exists.)
-
-
-Show PyDoc
-----------
-
-By using ``C-c C-d`` you can tell rope to show the pydoc of a python
-defined element.
-
-
-Goto Definition
----------------
-
-You can use ``C-c g`` for going to the line a name was defined in.
-
-
-Generate Python Elements
-------------------------
-
-The generate element actions make python elements.  You have to move
-on an element that does not exist and perform one of these generate
-actions.  For example::
-
-  my_print(var=1)
-
-Calling generate function on `my_print` (``C-c n f``) will result in::
-
-  def my_print(var):
-      pass
-
-
-  my_print(var=1)
-
-It handle methods, static methods, classes, variables, modules, and
-packages, too.  Generate element actions use ``C-c n`` prefix.
-
-
-Saving Locations And Strings
-----------------------------
-
-Rope can now save locations or strings in memory.  These are similar
-to emacs's bookmarks and registers.  These actions use ``C-x m``
-prefix.
-
-
-Defining Templates
-------------------
-
-You can define your own templates in ``~/.rope``.  You can use ``C-x c``
-and a line like this::
-
-    core.add('templates', ('say_hello', "print 'Hello, my name is ${name}'\n"))
-
-This defines a new python template called ``say_hello``.  Now if you
-type ``say_`` in a python file and use code-assist (``M-/``), this
-template will be proposed.  If you press enter you can insert the
-value to be used as ``name``.
-
-
 ``.ropeproject`` Folder
 =======================
 
 also extend python path using ``python_path`` config.
 
 
-Outline
-=======
+Version Control Systems Support
+===============================
 
-In tree views (like quick outline and project tree views) you can use
-``C-n`` and ``C-p`` to navigate and ``+`` and ``-`` to expand and
-collapse items.  You can use the ``Return`` key to select items.
+When you perform refactorings some files might need to be moved (when
+renaming a module) or new files might be created.  When you use a VCS
+rope uses that to perform file system actions.
 
+Currently rope supports Subversion (Uses `pysvn`_ library) and
+Mercurial_.  Rope uses Subversion if the `pysvn` module is available
+and there is a `.svn` in project root.  The Mercurial will be used if
+`mercurial` module is available and there is a `.hg` in project root.
+Rope assumes either all files are under version control in a project
+or there is no version control at all.  Also don't forget to commit
+your changes yourself, rope doesn't do that.
 
-SVN Support
-===========
+Adding support for other VCSs is easy have a look at
+`../dev/library.txt`_.
 
-The subversion support is somewhat basic.  What rope does is that when
-creating new files or when moving modules and packages for
-refactorings it will call the appropriate subversion commands.  The
-subversion support is automatically turned on when there is a ``.svn``
-folder inside project root and the ``pysvn`` package is
-available. (You can get PySVN from http://pysvn.tigris.org).  Rope
-assumes all files are under version control when these conditions are
-met.  Also don't forget to commit your changes yourself, rope doesn't
-do that yet.
+.. _../dev/library.txt: ../dev/library.html
+.. _pysvn: http://pysvn.tigris.org
+.. _Mercurial: http://selenic.com/mercurial
 
 
 Project History
 changes in project history undoes the changes it depends on, too.
 
 
+IDE Tools
+=========
+
+Keybinding
+----------
+
+You can change the keybinding in ``~/.rope``.  The keybinding is shown
+next to every action in menus.  Some of these bindings are chosen from
+emacs and some from eclipse.  ("C" stands for Control key and "M" for
+Meta(Alt) key.)
+
+
+Code Assist(Auto Complete)
+--------------------------
+
+You can complete names as you type by using code assist (``M-/``).
+The two capital letters in the left shows the type of the proposal.
+In the first column:
+
+* L: ``local``
+* G: ``global``
+* A: ``attribute``
+* T: ``template``
+* K: ``keyword``
+* B: ``built-in``
+* P: ``parameter_keyword``
+
+In the second column if present:
+
+* C: ``class``
+* F: ``function``
+* V: ``variable``
+* P: ``paramter``
+* I: ``imported``
+
+You can use ``main``, ``testcase``, ``hash``, ``eq`` and ``super``
+templates.  You can define your own templates in ``~/.rope``.  See
+examples in the default ``~/.rope`` file. (`rope.ui.dot_rope`
+module; It will be copied to ``~/.rope`` if none already exists.)
+
+
+Show PyDoc
+----------
+
+By using ``C-c C-d`` you can tell rope to show the pydoc of a python
+defined element.
+
+
+Goto Definition
+---------------
+
+You can use ``C-c g`` for going to the line a name was defined in.
+
+
+Generate Python Elements
+------------------------
+
+The generate element actions make python elements.  You have to move
+on an element that does not exist and perform one of these generate
+actions.  For example::
+
+  my_print(var=1)
+
+Calling generate function on `my_print` (``C-c n f``) will result in::
+
+  def my_print(var):
+      pass
+
+
+  my_print(var=1)
+
+It handle methods, static methods, classes, variables, modules, and
+packages, too.  Generate element actions use ``C-c n`` prefix.
+
+
+Saving Locations And Strings
+----------------------------
+
+Rope can now save locations or strings in memory.  These are similar
+to emacs's bookmarks and registers.  These actions use ``C-x m``
+prefix.
+
+
+Defining Templates
+------------------
+
+You can define your own templates in ``~/.rope``.  You can use ``C-x c``
+and a line like this::
+
+    core.add('templates', ('say_hello', "print 'Hello, my name is ${name}'\n"))
+
+This defines a new python template called ``say_hello``.  Now if you
+type ``say_`` in a python file and use code-assist (``M-/``), this
+template will be proposed.  If you press enter you can insert the
+value to be used as ``name``.
+
+
 Spell-Checker
-=============
+-------------
 
 The new spell-checker uses ispell/aspell if available.  You can use
 ``M-$`` like emacs for checking current word.  You can also use ``C-x
 $ r`` and ``C-x $ b`` for spell-checking region and buffer.
+
+
+Outline
+-------
+
+In tree views (like quick outline and project tree views) you can use
+``C-n`` and ``C-p`` to navigate and ``+`` and ``-`` to expand and
+collapse items.  You can use the ``Return`` key to select items.
 """rope, a python refactoring library and IDE"""
 
-VERSION = '0.6m3'
+VERSION = '0.6m4'

rope/base/fscommands.py

 """Project file system commands.
 
-This modules implements file system operations used by rope.
-Different version control systems can supported by implementing the
-interface provided by `FileSystemCommands` class.
+This modules implements file system operations used by rope.  Different
+version control systems can be supported by implementing the interface
+provided by `FileSystemCommands` class.  See `SubversionCommands` and
+`MercurialCommands` for example.
 
 """
 

setup.py

-import glob
-import os
-import shutil
-from distutils.core import setup
-
-import rope
-
-
-def make_temps():
-    if not os.path.exists('scripts'):
-        os.mkdir('scripts')
-    shutil.copy('rope.py', 'scripts/rope')
-    # copying docs
-    if not os.path.exists('rope/docs'):
-        os.mkdir('rope/docs')
-    docs = ['README.txt', 'COPYING']
-    docs.extend(glob.glob('docs/user/*.txt'))
-    docs.extend(glob.glob('docs/dev/*.txt'))
-    docs.extend(glob.glob('docs/*.txt'))
-    for name in docs:
-        shutil.copy(name, 'rope/docs/')
-
-def remove_temps():
-    if os.path.exists('scripts'):
-        shutil.rmtree('scripts')
-    if os.path.exists('rope/docs'):
-        shutil.rmtree('rope/docs')
-
-make_temps()
-
-classifiers=[
-    'Development Status :: 4 - Beta',
-    'Operating System :: OS Independent',
-    'Environment :: X11 Applications',
-    'Environment :: Win32 (MS Windows)',
-    # Have not been tested on MacOS
-    # 'Environment :: MacOS X',
-    'Intended Audience :: Developers',
-    'License :: OSI Approved :: GNU General Public License (GPL)',
-    'Natural Language :: English',
-    'Programming Language :: Python',
-    'Topic :: Software Development',
-    'Topic :: Text Editors :: Integrated Development Environments (IDE)']
-
-def get_long_description():
-    lines = open('README.txt').read().splitlines(False)
-    end = lines.index('Getting Started')
-    return '\n' + '\n'.join(lines[:end]) + '\n'
-
-setup(name='rope',
-      version=rope.VERSION,
-      description='a python refactoring IDE and library...',
-      long_description=get_long_description(),
-      author='Ali Gholami Rudi',
-      author_email='aligrudi@users.sourceforge.net',
-      url='http://rope.sf.net/',
-      packages=['rope', 'rope.base', 'rope.base.oi', 'rope.refactor',
-                'rope.refactor.importutils', 'rope.ide', 'rope.ui'],
-      package_data={'rope': ['docs/COPYING', 'docs/*.txt']},
-      scripts=['scripts/rope'],
-      license='GNU GPL',
-      classifiers=classifiers)
-
-remove_temps()
+import os
+import shutil
+import subprocess
+import sys
+
+
+def run_setup(args):
+    args.insert(0, 'setup.py')
+    args.insert(0, sys.executable)
+    process = subprocess.Popen(executable=sys.executable, args=args)
+    process.wait()
+
+
+if __name__ == '__main__':
+    for kind in ['rope', 'ropeide']:
+        manifest = 'tools/%s_MANIFEST.in' % kind
+        setup = 'tools/%s_setup.py' % kind
+        shutil.copy(manifest, 'MANIFEST.in')
+        shutil.copy(setup, 'setup.py')
+        try:
+            run_setup(sys.argv[1:])
+        finally:
+            for temp in ['setup.py', 'MANIFEST.in', 'MANIFEST']:
+                if os.path.exists(temp):
+                    os.remove(temp)

tools/rope_MANIFEST.in

+include README.txt COPYING setup.py MANIFEST.in
+recursive-include docs *.html *.txt
+
+recursive-include rope/base *.py
+recursive-include rope/refactor *.py
+include rope/*.py
+include ropetest/*.py
+include ropetest/refactor/*.py

tools/rope_setup.py

+import glob
+import os
+import shutil
+from distutils.core import setup
+
+import rope
+
+
+classifiers=[
+    'Development Status :: 4 - Beta',
+    'Operating System :: OS Independent',
+    'Environment :: X11 Applications',
+    'Environment :: Win32 (MS Windows)',
+    # Have not been tested on MacOS
+    # 'Environment :: MacOS X',
+    'Intended Audience :: Developers',
+    'License :: OSI Approved :: GNU General Public License (GPL)',
+    'Natural Language :: English',
+    'Programming Language :: Python',
+    'Topic :: Software Development',
+    'Topic :: Text Editors :: Integrated Development Environments (IDE)']
+
+def get_long_description():
+    lines = open('README.txt').read().splitlines(False)
+    end = lines.index('Getting Started')
+    return '\n' + '\n'.join(lines[:end]) + '\n'
+
+setup(name='rope',
+      version=rope.VERSION,
+      description='a python refactoring library...',
+      long_description=get_long_description(),
+      author='Ali Gholami Rudi',
+      author_email='aligrudi@users.sourceforge.net',
+      url='http://rope.sf.net/',
+      packages=['rope', 'rope.base', 'rope.base.oi', 'rope.refactor',
+                'rope.refactor.importutils'],
+      license='GNU GPL',
+      classifiers=classifiers)

tools/ropeide_MANIFEST.in

+include README.txt COPYING rope.py runtests.py setup.py MANIFEST.in
+recursive-include docs *.html *.txt
+
+recursive-include rope *.py
+recursive-include ropetest *.py
+
+prune scripts

tools/ropeide_setup.py

+import glob
+import os
+import shutil
+from distutils.core import setup
+
+import rope
+
+
+def make_temps():
+    if not os.path.exists('scripts'):
+        os.mkdir('scripts')
+    shutil.copy('rope.py', 'scripts/rope')
+    # copying docs
+    if not os.path.exists('rope/docs'):
+        os.mkdir('rope/docs')
+    docs = ['README.txt', 'COPYING']
+    docs.extend(glob.glob('docs/user/*.txt'))
+    docs.extend(glob.glob('docs/dev/*.txt'))
+    docs.extend(glob.glob('docs/*.txt'))
+    for name in docs:
+        shutil.copy(name, 'rope/docs/')
+
+def remove_temps():
+    if os.path.exists('scripts'):
+        shutil.rmtree('scripts')
+    if os.path.exists('rope/docs'):
+        shutil.rmtree('rope/docs')
+
+classifiers=[
+    'Development Status :: 4 - Beta',
+    'Operating System :: OS Independent',
+    'Environment :: X11 Applications',
+    'Environment :: Win32 (MS Windows)',
+    # Have not been tested on MacOS
+    # 'Environment :: MacOS X',
+    'Intended Audience :: Developers',
+    'License :: OSI Approved :: GNU General Public License (GPL)',
+    'Natural Language :: English',
+    'Programming Language :: Python',
+    'Topic :: Software Development',
+    'Topic :: Text Editors :: Integrated Development Environments (IDE)']
+
+def get_long_description():
+    lines = open('README.txt').read().splitlines(False)
+    end = lines.index('Getting Started')
+    return '\n' + '\n'.join(lines[:end]) + '\n'
+
+make_temps()
+try:
+    setup(name='ropeide',
+          version=rope.VERSION,
+          description='a python refactoring IDE and library...',
+          long_description=get_long_description(),
+          author='Ali Gholami Rudi',
+          author_email='aligrudi@users.sourceforge.net',
+          url='http://rope.sf.net/',
+          packages=['rope', 'rope.base', 'rope.base.oi', 'rope.refactor',
+                    'rope.refactor.importutils', 'rope.ide', 'rope.ui'],
+          package_data={'rope': ['docs/COPYING', 'docs/*.txt']},
+          scripts=['scripts/rope'],
+          license='GNU GPL',
+          classifiers=classifiers)
+finally:
+    remove_temps()