Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ported setup tags command from v31 branch.

  • Loading branch information...
commit a42975a2a442365b63f687380be87bd85b1ea7e5 1 parent 4d39e50
@mkleehammer authored
Showing with 19 additions and 2 deletions.
  1. +19 −2 setup.py
View
21 setup.py
@@ -16,7 +16,7 @@
class VersionCommand(Command):
- description = "Prints the pyodbc version, determined from git"
+ description = "prints the pyodbc version, determined from git"
user_options = []
@@ -31,6 +31,22 @@ def run(self):
print version_str
+class TagsCommand(Command):
+ description = 'runs etags'
+ user_options = []
+ def initialize_options(self):
+ pass
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ # Windows versions of etag do not seem to expand wildcards (which Unix shells normally do for Unix utilities),
+ # so find all of the files ourselves.
+ files = [ join('src', f) for f in os.listdir('src') if f.endswith(('.h', '.cpp')) ]
+ cmd = 'etags %s' % ' '.join(files)
+ return os.system(cmd)
+
+
def main():
version_str, version = get_version()
@@ -119,7 +135,8 @@ def main():
url = 'http://code.google.com/p/pyodbc',
download_url = 'http://code.google.com/p/pyodbc/downloads/list',
- cmdclass = { 'version' : VersionCommand })
+ cmdclass = { 'version' : VersionCommand,
+ 'tags' : TagsCommand })
Please sign in to comment.
Something went wrong with that request. Please try again.