Skip to content

Commit

Permalink
scons.1 sconsign.1 scons-time.1 now make it into zip, tgz sdist and w…
Browse files Browse the repository at this point in the history
…heel
  • Loading branch information
bdbaddog committed Oct 9, 2020
1 parent ea1da16 commit da582df
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ htmlcov

# Mac junk
**/.DS_Store


# SCons specific
*.1
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ recursive-include SCons/Tool/docbook *
# For license file
include LICENSE

include scons.1 sconsign.1 scons-time.1
recursive-include build/doc/man *.1



8 changes: 4 additions & 4 deletions SCons/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
__version__="4.0.1"
__version__="4.0.1.9998"
__copyright__="Copyright (c) 2001 - 2020 The SCons Foundation"
__developer__="bdbaddog"
__date__="2020-07-17 01:50:03"
__date__="2020-10-09 19:00:35"
__buildsys__="ProDog2020"
__revision__="c289977f8b34786ab6c334311e232886da7e8df1"
__build__="c289977f8b34786ab6c334311e232886da7e8df1"
__revision__="93525bed88d19a00f5de400086c0046011d3b833"
__build__="93525bed88d19a00f5de400086c0046011d3b833"
# make sure compatibility is always in place
import SCons.compat # noqa
19 changes: 14 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ copyright_years = strftime('2001 - %Y')
# This gets inserted into the man pages to reflect the month of release.
month_year = strftime('%B %Y')
#
# __COPYRIGHT__
# MIT License
#
# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
Expand All @@ -36,7 +38,7 @@ month_year = strftime('%B %Y')


project = 'scons'
default_version = '4.0.1'
default_version = '4.0.1.9998'
copyright = "Copyright (c) %s The SCons Foundation" % copyright_years

#
Expand Down Expand Up @@ -193,14 +195,21 @@ Export('command_line', 'env', 'whereis', 'revaction')
SConscript('doc/SConscript')


# Copy manpage's into base dir for inclusign in pypi packages
man_pages = env.Install("#/", Glob("#/build/doc/man/*.1"))

# Build packages for pypi
env.Command('$DISTDIR/SCons-${VERSION}-py3-none-any.whl', ['setup.cfg', 'setup.py', 'SCons/__init__.py'],
wheel = env.Command('$DISTDIR/SCons-${VERSION}-py3-none-any.whl', ['setup.cfg', 'setup.py', 'SCons/__init__.py']+man_pages,
'$PYTHON setup.py bdist_wheel')

env.Command('$DISTDIR/SCons-${VERSION}.zip', ['setup.cfg', 'setup.py', 'SCons/__init__.py'],
zip_file = env.Command('$DISTDIR/SCons-${VERSION}.zip', ['setup.cfg', 'setup.py', 'SCons/__init__.py']+man_pages,
'$PYTHON setup.py sdist --format=zip')
env.Command('$DISTDIR/SCons-${VERSION}.tar.gz', ['setup.cfg', 'setup.py', 'SCons/__init__.py'],
tgz_file = env.Command('$DISTDIR/SCons-${VERSION}.tar.gz', ['setup.cfg', 'setup.py', 'SCons/__init__.py']+man_pages,
'$PYTHON setup.py sdist --format=gztar')

# Now set depends so the above run in a particular order
env.Depends(tgz_file, [zip_file, wheel])
env.AddPostAction(tgz_file, Delete(man_pages))

# TODO add auto copyright date to README.rst, LICENSE
# TODO build API DOCS
12 changes: 10 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ classifiers =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Expand Down Expand Up @@ -60,13 +61,20 @@ console_scripts =


[options.package_data]
* = *.txt, *.rst
* = *.txt, *.rst, *.1
SCons.Tool.docbook = *.*


[options.data_files]
. = build/doc/man/scons.1
build/doc/man/scons-time.1
build/doc/man/sconsign.1

[sdist]
dist-dir=build/dist

[bdist_wheel]
; We're now py3 only
;universal=true
dist-dir=build/dist
dist-dir=build/dist

3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
import codecs
import os.path


def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()


def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
Expand All @@ -21,7 +23,6 @@ def get_version(rel_path):
raise RuntimeError("Unable to find version string.")



exclude = ['*Tests']


Expand Down
10 changes: 9 additions & 1 deletion site_scons/scons_local_package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# __COPYRIGHT__
# MIT License
#
# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -60,6 +62,12 @@ def install_local_package_files(env):
fn = os.path.basename(bf)
all_local_installed.append(env.SCons_revision('#/build/scons-local/%s'%fn, bf))

# Now copy manpages into scons-local package
built_manpage_files = env.Glob('build/doc/man/*.1')
for bmp in built_manpage_files:
fn = os.path.basename(str(bmp))
all_local_installed.append(env.SCons_revision('#/build/scons-local/%s'%fn, bmp))

rename_files = [('scons-${VERSION}.bat', 'scripts/scons.bat'),
('scons-README', 'README-local'),
('scons-LICENSE', 'LICENSE-local')]
Expand Down

0 comments on commit da582df

Please sign in to comment.