Skip to content

Commit 6a01e64

Browse files
committed
MAINT: move package files to the src directory.
Avoid overriding package installation when Python is started from the project directory.
1 parent eca6828 commit 6a01e64

File tree

108 files changed

+11
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11
-11
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ nosetests.xml
4444
.pydevproject
4545
setup.cfg
4646
.gdb_history
47-
/pyobjcryst/version.cfg
47+
/src/pyobjcryst/version.cfg
4848
/.settings/*

MANIFEST.in

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
recursive-include pyobjcryst *
2-
recursive-include extensions *
1+
recursive-include src *
32
include SConstruct
43
include AUTHORS.txt LICENSE*.txt README.rst
5-
recursive-exclude pyobjcryst *.pyc *.so
4+
recursive-exclude src *.pyc *.so
65
recursive-exclude * .gitattributes .gitignore .DS_Store

SConstruct

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@ Export('env', 'pyconfigvar', 'pyoutput')
148148
if os.path.isfile('sconscript.local'):
149149
env.SConscript('sconscript.local')
150150

151-
env.SConscript('extensions/SConscript', variant_dir=builddir)
151+
env.SConscript('src/extensions/SConscript', variant_dir=builddir)
152152

153153
# vim: ft=python

setup.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ def create_extensions():
6565
if not n in ext_kws['libraries']]
6666
ext_kws['libraries'] += blibs
6767
ext = Extension('pyobjcryst._pyobjcryst',
68-
glob.glob("extensions/*.cpp"),
69-
**ext_kws)
68+
glob.glob("src/extensions/*.cpp"),
69+
**ext_kws)
7070
return [ext]
7171

7272

7373
# versioncfgfile holds version data for git commit hash and date.
7474
# It must reside in the same directory as version.py.
7575
MYDIR = os.path.dirname(os.path.abspath(__file__))
76-
versioncfgfile = os.path.join(MYDIR, 'pyobjcryst/version.cfg')
76+
versioncfgfile = os.path.join(MYDIR, 'src/pyobjcryst/version.cfg')
7777
gitarchivecfgfile = versioncfgfile.replace('version.cfg', 'gitarchive.cfg')
7878

7979
def gitinfo():
@@ -139,6 +139,7 @@ def getversioncfg():
139139

140140
# What we're installing
141141
packages = ['pyobjcryst', 'pyobjcryst.tests'],
142+
package_dir = {'' : 'src'},
142143
test_suite = 'pyobjcryst.tests',
143144
include_package_data = True,
144145
zip_safe = False,

extensions/SConscript src/extensions/SConscript

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Alias('module', module)
2222
# install in a development mode
2323
gitdir = env['ENV'].get('GIT_DIR', '#/.git')
2424
gheads = Glob(gitdir + '/HEAD') + Glob(gitdir + '/refs/heads/*')
25-
egginfo = env.Command(NoCache('#/pyobjcryst.egg-info/PKG-INFO'), gheads,
26-
'$python setup.py egg_info')
27-
develop = Alias('develop', [egginfo, Install('#/pyobjcryst', module)])
25+
egginfo = env.Command(NoCache('#/src/pyobjcryst.egg-info/PKG-INFO'), gheads,
26+
'$python setup.py egg_info')
27+
develop = Alias('develop', [egginfo, Install('#/src/pyobjcryst', module)])
2828

2929
test = env.Alias('test', develop,
3030
'$python -m pyobjcryst.tests.run')
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)