annotate setup.py @ 1106:cca56bbea143

tests: copy hg test infra from hg repo @5cfdf6137af8
author Tony Tung <ttung@chanzuckerberg.com <mailto:ttung@chanzuckerberg.com>>
date Tue, 06 Feb 2018 16:34:28 -0800
parents 5cc9594cc811
children 21264429a8d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
253
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
1 try:
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
2 from setuptools import setup
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
3 except:
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
4 from distutils.core import setup
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
5
479
5c1d4311440d submodules: only use the ordereddict backport if collections.OrderedDict is unavailable
Augie Fackler <raf@durin42.com>
parents: 477
diff changeset
6 try:
5c1d4311440d submodules: only use the ordereddict backport if collections.OrderedDict is unavailable
Augie Fackler <raf@durin42.com>
parents: 477
diff changeset
7 from collections import OrderedDict
5c1d4311440d submodules: only use the ordereddict backport if collections.OrderedDict is unavailable
Augie Fackler <raf@durin42.com>
parents: 477
diff changeset
8 extra_req = []
5c1d4311440d submodules: only use the ordereddict backport if collections.OrderedDict is unavailable
Augie Fackler <raf@durin42.com>
parents: 477
diff changeset
9 except ImportError:
536
3b82cf6ac73a setup: fix typo forgetting brackets introduced in 5c1d4311440d
Sean Farley <sean@mcs.anl.gov>
parents: 521
diff changeset
10 extra_req = ['ordereddict>=1.1']
479
5c1d4311440d submodules: only use the ordereddict backport if collections.OrderedDict is unavailable
Augie Fackler <raf@durin42.com>
parents: 477
diff changeset
11
912
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
12
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
13 from os.path import dirname, join
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
14 def get_version(relpath):
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
15 root = dirname(__file__)
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
16 for line in open(join(root, relpath), 'rb'):
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
17 line = line.decode('utf-8')
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
18 if '__version__' in line:
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
19 return line.split("'")[1]
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
20
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
21
253
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
22 setup(
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
23 name='hg-git',
912
5cc9594cc811 Add version info to hggit for "hg --version -v"
anatoly techtonik <techtonik@gmail.com>
parents: 902
diff changeset
24 version=get_version('hggit/__init__.py'),
720
9f20b66027c2 setup: bump version number, correct author
Augie Fackler <raf@durin42.com>
parents: 626
diff changeset
25 author='The hg-git Authors',
253
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
26 maintainer='Augie Fackler',
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
27 maintainer_email='durin42@gmail.com',
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
28 url='http://hg-git.github.com/',
607
681298a09daf Updated `setup.py` file to reflect requirement on newer version of dulwich package.
Alex Regueiro <alex@noldorin.com>
parents: 574
diff changeset
29 description='push to and pull from a Git repository using Mercurial',
253
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
30 long_description="""
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
31 This extension lets you communicate (push and pull) with a Git server.
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
32 This way you can use Git hosting for your project or collaborate with a
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
33 project that is in Git. A bridger of worlds, this plugin be.
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
34 """.strip(),
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
35 keywords='hg git mercurial',
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
36 license='GPLv2',
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
37 packages=['hggit'],
481
9df1741f3977 help: add additional help topics
David M. Carr <david@carrclan.us>
parents: 473
diff changeset
38 package_data={ 'hggit': ['help/git.rst'] },
743
c7ea22aa3440 setup: include document files to package. (issue114)
Takumi IINO <trot.thunder@gmail.com>
parents: 720
diff changeset
39 include_package_data=True,
750
e5e1a287121d setup: require newer dulwich so we can always pass an opener to HttpGitClient
Augie Fackler <raf@durin42.com>
parents: 744
diff changeset
40 install_requires=['dulwich>=0.9.7'] + extra_req,
253
505d7cdca198 package with distutils
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
41 )