rpms/jython/devel fetch-jython.sh, NONE, 1.1 jython-cachedir.patch, NONE, 1.1 jython-nofullbuildpath.patch, NONE, 1.1 jython.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Andrew Overholt (overholt) fedora-extras-commits at redhat.com
Mon Jan 22 21:54:53 UTC 2007


Author: overholt

Update of /cvs/extras/rpms/jython/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17573/devel

Modified Files:
	.cvsignore sources 
Added Files:
	fetch-jython.sh jython-cachedir.patch 
	jython-nofullbuildpath.patch jython.spec 
Log Message:
auto-import jython-2.2-0.2.a1 on branch devel from jython-2.2-0.2.a1.src.rpm


--- NEW FILE fetch-jython.sh ---
#!/bin/sh

# Generate a source drop for jython from SVN

# Usage message
usage="usage: $0 <project_name> <svn_root> <svn_tag>"

project_name=$1
svn_root=$2
svn_tag=$3

# Ensure we got all of the variables
if [ "x$project_name"x = "xx" ]
then
        echo >&2 "$usage"
        exit 1
fi

if [ "x$svn_root"x = "xx" ]
then
        echo >&2 "$usage"
        exit 1
fi

if [ "x$svn_tag"x = "xx" ]
then
        echo >&2 "$usage"
        exit 1
fi

mkdir -p temp && cd temp

svn export --username guest --password "" $svn_root/$project_name/tags/$svn_tag
mv $svn_tag/$project_name $project_name-svn-$svn_tag
tar jcf $project_name-fetched-src-$svn_tag.tar.bz2 $project_name-svn-$svn_tag

jython-cachedir.patch:

--- NEW FILE jython-cachedir.patch ---
--- jython-20030113/org/python/core/PySystemState.java~ 2003-01-14 16:44:44.000000000 -0500
+++ jython-20030113/org/python/core/PySystemState.java  2003-01-14 16:47:55.000000000 -0500
@@ -459,7 +459,13 @@
         }
         cachedir = new File(props.getProperty("python.cachedir", "cachedir"));
         if (!cachedir.isAbsolute()) {
-            cachedir = new File(PySystemState.prefix, cachedir.getPath());
+            File jythondir = new File(System.getProperty("user.home"), ".jython");
+
+            if (!jythondir.isDirectory()) {
+                jythondir.mkdirs();
+            }
+
+            cachedir = new File(jythondir, cachedir.getPath());
         }
     }

--- jython/org/python/core/PySystemState.java~	2004-02-16 17:27:22.000000000 -0500
+++ jython/org/python/core/PySystemState.java	2004-02-16 17:29:05.000000000 -0500
@@ -311,8 +311,8 @@
             }
             try {
                 addRegistryFile(new File(prefix, "registry"));
-                File homeFile = new File(registry.getProperty("user.home"),
-                                         ".jython");
+                File homeFile = new File(new File(registry.getProperty("user.home"),
+                                         ".jython"), "registry");
                 addRegistryFile(homeFile);
             } catch (Exception exc) {
                 ;

jython-nofullbuildpath.patch:

--- NEW FILE jython-nofullbuildpath.patch ---
Index: build.xml
===================================================================
--- build.xml	(revision 2972)
+++ build.xml	(working copy)
@@ -460,7 +460,7 @@
 
 
     <!-- build the .html files using the ht2html tool -->
-    <target name="doc" depends="compile" if="full-build">
+    <target name="doc" depends="compile">
         <fail unless="ht2html.dir" message="ht2html.dir is not set" />
         <copy todir="${dist.dir}/Doc" preservelastmodified="true">
             <fileset dir="Doc" includes="*.ht, **/*.gif" />
@@ -481,7 +481,7 @@
 
 
     <!-- javadoc -->
-    <target name="javadoc" depends="compile" if="full-build">
+    <target name="javadoc" depends="compile">
         <javadoc sourcepath="${source.dir}"
                  destdir="${apidoc.dir}"
                  source="${jdk.source.version}"
@@ -497,7 +497,7 @@
 
 
     <!-- copy for full distribution -->
-    <target name="copy-full" if="full-build">
+    <target name="copy-full">
         <!-- Misc files -->
         <echo>copy misc files from ${source.dir}</echo>
         <copy todir="${dist.dir}" preservelastmodified="true">
@@ -509,7 +509,7 @@
         <!-- copy the CPython license -->
         <echo>copy CPython LICENSE from ${python.home} to ${dist.dir}/LICENSE_CPython.txt</echo>
         <!-- +++ TODO: checkout the CPython LICENSE (not: .txt) and copy from there -->
-        <copy file="${python.home}/LICENSE.txt" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
+        <copy file="${PyXmlHome}/LICENSE.txt" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
 
         <!-- sources: todir has to correspond with installer/**/JarInstaller.java -->
         <echo>copy sources from ${source.dir}</echo>


--- NEW FILE jython.spec ---
%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}

%define name               jython
%define version            2.2
%define cpython_version    %{pyver}
%define cpythondir         python%{cpython_version}
%define pyxml_version      0.8.3
%define release            0.2.a1
%define svn_tag            Release_2_2alpha1

%define gcj_support        1

Name:                      %{name}
Version:                   %{version}
Release:                   %{release}%{?dist}
Summary:                   A Java implementation of the Python language
License:                   Modified CNRI Open Source License
URL:                       http://www.jython.org/
#
# Use the enclosed script (fetch-jython.sh) to generate the source drop for jython 2.2a1
# 
# sh fetch-jython.sh jython https://svn.sourceforge.net/svnroot Release_2_2alpha1
#
Source0:                   %{name}-fetched-src-%{svn_tag}.tar.bz2
Source1:                   python-release22-maint-cvs.tar.bz2
Source2:                   fetch-%{name}.sh
Patch0:                    %{name}-cachedir.patch
# Make javadoc and copy-full tasks not depend upon "full-build"
# Also, copy python's license from ${PyXmlHome} and not ${python.home}
Patch1:                    %{name}-nofullbuildpath.patch
Requires:                  jpackage-utils >= 0:1.5
Requires:                  oro
Requires:                  servlet
Requires:                  python >= %{cpython_version}
Requires:                  libreadline-java
Requires:                  mysql-connector-java
BuildRequires:             ant
BuildRequires:             ht2html
BuildRequires:             libreadline-java
BuildRequires:             mysql-connector-java
BuildRequires:             oro
BuildRequires:             python >= %{cpython_version}
BuildRequires:             PyXML >= %{pyxml_version}
BuildRequires:             servlet
%if %{gcj_support}
BuildRequires:             java-gcj-compat-devel >= 1.0.31
Requires(post):            java-gcj-compat >= 1.0.31
Requires(postun):          java-gcj-compat >= 1.0.31
%else
BuildRequires:             java-devel >= 1.4.2
Requires:                  java >= 1.4.2
%endif
Group:                     Development/Languages
BuildRoot:                 %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
Jython is an implementation of the high-level, dynamic, object-oriented
language Python seamlessly integrated with the Java platform. The
predecessor to Jython, JPython, is certified as 100% Pure Java. Jython is
freely available for both commercial and non-commercial use and is
distributed with source code. Jython is complementary to Java and is
especially suited for the following tasks: Embedded scripting - Java
programmers can add the Jython libraries to their system to allow end
users to write simple or complicated scripts that add functionality to the
application. Interactive experimentation - Jython provides an interactive
interpreter that can be used to interact with Java packages or with
running Java applications. This allows programmers to experiment and debug
any Java system using Jython. Rapid application development - Python
programs are typically 2-10X shorter than the equivalent Java program.
This translates directly to increased programmer productivity. The
seamless interaction between Python and Java allows developers to freely
mix the two languages both during development and in shipping products.

%package javadoc
Summary:           Javadoc for %{name}
Group:             Documentation

%description javadoc
Javadoc for %{name}.

%package doc
Summary:           Usage docs for %{name}
Group:             Documentation

%description doc
Usage docs for %{name}.

%package demo
Summary:           Demo for %{name}
Requires:          %{name} = %{version}-%{release}
Group:             Documentation

%description demo
Demonstrations and samples for %{name}.

%prep
%setup -q -n %{name}-svn-%{svn_tag}
%setup -q -n %{name}-svn-%{svn_tag} -T -D -a 1
%patch0 -p1
%patch1 -p0

%build
export CLASSPATH=$(build-classpath libreadline-java mysql-connector-java oro servlet)

rm -rf org/apache

perl -p -i -e 's|execon|apply|g' build.xml

#ant -Dpython.lib=%{_libdir}/python%pyver -DPyXmlHome=%{_libdir}/python%pyver -Dtargetver=1.3 copy-dist
ant \
  -Dpython.home=%{_bindir} \
  -Dht2html.dir=%{_datadir}/ht2html \
  -Dpython.lib=./python/dist/src/Lib \
  -Dpython.exe=%{_bindir}/python \
  -DPyXmlHome=%{_libdir}/python%pyver \
  -Dtargetver=1.3 \
  copy-dist

# remove #! from python files
pushd dist
for f in `find . -name '*.py'`; do
sed --in-place  "s:#!\s*/usr.*::" $f
done
popd

%install
rm -rf $RPM_BUILD_ROOT

# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr dist/Doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
# data
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
# these are not supposed to be distributed
find dist/Lib -type d -name test | xargs rm -rf

cp -pr dist/Lib $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr dist/Tools $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr dist/Demo $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -pr dist/Doc $RPM_BUILD_ROOT%{_datadir}/%{name}

# registry
install -m 644 registry $RPM_BUILD_ROOT%{_datadir}/%{name}
# scripts
install -d $RPM_BUILD_ROOT%{_bindir}

cat > $RPM_BUILD_ROOT%{_bindir}/%{name} << EOF
#!/bin/sh
#
# %{name} script
# JPackage Project (http://jpackage.sourceforge.net)

# Source functions library
. %{_datadir}/java-utils/java-functions

# Source system prefs
if [ -f %{_sysconfdir}/%{name}.conf ] ; then
  . %{_sysconfdir}/%{name}.conf
fi

# Source user prefs
if [ -f \$HOME/.%{name}rc ] ; then
  . \$HOME/.%{name}rc
fi

# Configuration
MAIN_CLASS=org.python.util.%{name}
BASE_FLAGS=-Dpython.home=%{_datadir}/%{name}
BASE_JARS="%{name} oro servlet"

if [ -f %{_libdir}/libJavaEditline.so* ]; then
  BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole"
  BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=%{_libdir}"
  BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=EditLine"
  BASE_JARS="\$BASE_JARS libreadline-java"
fi

if [ -f %{_javadir}/mysql-connector-java.jar ]; then
  BASE_JARS="\$BASE_JARS mysql-connector-java"
fi

# Set parameters
set_jvm
set_classpath \$BASE_JARS
set_flags \$BASE_FLAGS
set_options \$BASE_OPTIONS

# Let's start
run "\$@"
EOF

cat > $RPM_BUILD_ROOT%{_bindir}/%{name}c << EOF
#!/bin/sh
#
# %{name}c script
# JPackage Project (http://jpackage.sourceforge.net)

%{_bindir}/%{name} %{_datadir}/%{name}/Tools/%{name}c/%{name}c.py "\$@"
EOF

rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/Lib/UserDict.py

# Natively compile
%if %{gcj_support}
%{_bindir}/aot-compile-rpm --exclude %{_datadir}/%{name}/Demo/jreload
%endif

%post
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%post demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc ACKNOWLEDGMENTS NEWS LICENSE.txt README.txt
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_bindir}/%{name}c
%{_javadir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/Lib
%{_datadir}/%{name}/Tools
%{_datadir}/%{name}/registry
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/jython-%{version}.jar*
%endif

%files javadoc
%defattr(-,root,root)
%doc %{_javadocdir}/%{name}-%{version}

%files doc
%defattr(-,root,root)
%{_datadir}/%{name}/Doc

%files demo
%defattr(-,root,root)
%doc %{_datadir}/%{name}/Demo
%if %{gcj_support}
%{_libdir}/gcj/%{name}/example.jar*
%endif

%changelog
* Thu Jan 11 2007 Andrew Overholt <overholt at redhat.com> 2.2-0.2.a1
- Add doc target to nofullbuild patch to actually generate ht2html docs.
- Add doc sub-package.
- Require libreadline-java and mysql-connector-java.

* Tue Dec 19 2006 Andrew Overholt <overholt at redhat.com> 2.2-0.1.a1
- Remove jpp from the release tag.

* Thu Nov 16 2006 Andrew Overholt <overholt at redhat.com> 2.2-0.a1.1jpp_1fc
- Update to 2.2alpha1.
- Include script to generate source tarball.
- Add patch to make javadoc and copy-full tasks not depend upon "full-build".
- Remove manual sub-package as its contents appear to no longer be present.
- Move demo aot-compiled bits to demo package.
- Add rebuild-gcj-db %%post{,un} to demo package.

* Fri Sep 22 2006 Igor Foox <ifoox at redhat.com> 2.2-0.a0.2jpp_5fc
- Remove redundant patch1.

* Thu Sep 21 2006 Igor Foox <ifoox at redhat.com> 2.2-0.a0.2jpp_4fc
- Go back to using the pre-supplied python2.2 source.
- Remove hash-bang from .py files since they are not executable.

* Sat Sep 9 2006 Igor Foox <ifoox at redhat.com> 2.2-0.a0.2jpp_3fc
- Fix Group tags to Development/Languages and Documentation.
- Remove epoch from the jython-demo subpackage's Requires on jython.
- Fix indentation to space-only.
- Added %%doc to files in the -javadoc and -demo packages.

* Fri Sep 8 2006 Igor Foox <ifoox at redhat.com> 2.2-0.a0.2jpp_2fc
- Add dist tag.
- Fix compile line to use the system Python libraries instead of the python2.2
source.
- Remove Source1 (python2.2 library).
- Remove 0 Epoch.
- Remove unneeded 0 Epoch from BRs and Requires.
- Remove Vendor and Distribution tags.
- Fix summary.
- Fix Group, removing Java.
- Change buildroot to standard buildroot.
- Move buildroot removal from prep to install.
- Use libedit (EditLine) instead of GNU readline.

* Thu Jun 1 2006 Igor Foox <ifoox at redhat.com> 0:2.2-0.a0.2jpp_1fc
- Rebuild with ant-1.6.5
- Natively compile
- Add -Dtargetver=1.3
- Changed BuildRoot to what Extras expects

* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:2.2-0.a0.2jpp
- Rebuild with ant-1.6.2
- Allow build use of python >= 2.3 to generate docs since 2.2 libraries included

* Sun Feb 15 2004 David Walluck <david at anti-microsoft.org> 0:2.2-0.a0.1jpp
- 2.2a0 (CVS)
- add URL tag
- add Distribution tag
- change cachedir patch to use ~/.jython instead of ~/tmp
- remove sys.platform patch
- use included python 2.2 files
- mysql support is back

* Fri Apr 11 2003 David Walluck <david at anti-microsoft.org> 0:2.1-5jpp
- rebuild for JPackage 1.5
- remove mm.mysql support

* Sun Jan 26 2003 David Walluck <david at anti-microsoft.org> 2.1-4jpp
- add PyXML modules from 0.8.2
- make BuildRequires a bit more strict

* Wed Jan 22 2003 David Walluck <david at anti-microsoft.org> 2.1-3jpp
- CVS 20030122
- remove javacc dependency (it's non-free, not needed, and the build is broken)
- add python modules (BuildRequires: python)
- add PyXML modules (BuildRequires: PyXML)
- add HTML documentation (BuildRequires: ht2html)
- optional JavaReadline support (BuildRequires: libreadline-java)
- optional MySQL support (BuildRequires: mm.mysql)
- optional PostgreSQL support is not available at this time due to strange jars
- add jython script
- add jythonc script
- add registry
- Patch0: fix cachedir creation in cwd
- Patch1: fix sys.platform (site.py expects format: <os.name>-<os.arch>)
- remove oro class files from jython and require the oro RPM instead
- change Url tag

* Mon Mar 18 2002 Guillaume Rousse <guillomovitch at users.sourceforge.net> 2.1-2jpp 
- generic servlet support

* Wed Mar 06 2002 Guillaume Rousse <guillomovitch at users.sourceforge.net> 2.1-1jpp 
- 2.1
- section macro

* Thu Jan 17 2002 Guillaume Rousse <guillomovitch at users.sourceforge.net> 2.0-2jpp
- versioned dir for javadoc
- no dependencies for manual and javadoc packages
- stricter dependency for demo package

* Tue Dec 18 2001 Guillaume Rousse <guillomovitch at users.sourceforge.net> 2.0-1jpp
- first JPackage release


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/jython/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	22 Jan 2007 21:53:38 -0000	1.1
+++ .cvsignore	22 Jan 2007 21:54:23 -0000	1.2
@@ -0,0 +1,2 @@
+jython-fetched-src-Release_2_2alpha1.tar.bz2
+python-release22-maint-cvs.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/jython/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	22 Jan 2007 21:53:38 -0000	1.1
+++ sources	22 Jan 2007 21:54:23 -0000	1.2
@@ -0,0 +1,2 @@
+8440245391794d2be88c8183ba23eb84  jython-fetched-src-Release_2_2alpha1.tar.bz2
+2b81cfa5288d88349cdfc86da4ec33d5  python-release22-maint-cvs.tar.bz2




More information about the fedora-extras-commits mailing list